title:  Action
author: tiglari

To produce the action we want, we need this:
<code>
def tagSideClick(m):
    quarkx.msgbox("This command does nothing", MT_INFORMATION, MB_OK)
</code>

This defines a function `tagSideClick', which gets a parameter `m', which is the actual menu item that invoked the action.  We don't use this
here, but we will later on.
The body of the function calls the `msgbox' function from the module
`quarkx', which is imported in the first import statement.  Note
that this works a bit differently from say an
<tt>#include</tt>
in C; when we import a module, we can't just use the names of the
functions in it, but have to `qualify' those names by putting the
module name in front, separated by a period.

This is to improve readability, at the expense of a a bit of
typing on the part of the writer of the program; the name of
the important function when it's used states where it came from,
so the reader has a better chance of finding out what it does.
We will soon see how to use unqualified imported names as well.

As for the actual <tt>msgbox</tt> function, it produces little
`message box' dialogs that you can respond to by pushing buttons; its
first argument is the string to be displayed in the
message box, the second a `type' which determines the graphic icons
associated with the box, and third a flag that says that
the messagebox has an OK button.

Symbolic names for the useful values for these arguments are
defined in the file <tt>quarkpy\qtils.py</tt>,
under the heading `# quarkx.msgbox'.
So you can look there to see what the possibilities are.
But hey, we haven't imported this module, and the symbols
aren't qualified anyway, so what's going on?

What we have done is imported the module quarkpy.maputils,
in a somewhat different way, in the last line of the import
statement. <tt>from <i>&lt;module name%gt;</i> import *</tt>
means `import everything that's defined in the named module, and use it without
qualification'.  And furthermore, <tt>quarkpy.maputils,</tt>
a general grab-bag of utility functions for the map editor, imports
<tt>quarkpy.qeditor</tt> in this way, which itself does the same to
<tt>quarkpy.qutils.py</tt>. So everything defined
in all of these modules is available to our plugin, without
qualifying the names.

This is convenient for the writer, but can be confusing
for the reader.  Even more so because symbols defined in later
imports will override definitions from earlier ones.  So this
import style should only be used for a limited number of
widely used utility files, which people working on the program
can be expected to learn about soon.

One more thing with the import statements, what's the deal
with the dots?  Python modules are religiously identified
as files, and folders are taken to be `super modules' containing
sub-modules.  So all of the files in quarkpy make up the quarkpy
module, and to import them into a file outside of quarkpy
you need the quarkpy. qualification.  Inside quarkpy you don't,
so the statement that <tt>maputils.py</tt> uses to import <tt>qeditor.py</tt> is just:
<code>
from qeditor import *
</code>
