Keystroke equivalents in MetaCard

John Kiltinen kiltinen at nmu.edu
Mon Jul 1 12:12:01 EDT 2002


Hello MetaCard Gurus:

I have a question about MetaCard's implementation of
Command-key-plus-letter keystroke equivalents for menu items such as
command+W to close a window and command+V to paste.

I am in the final stages--at long last--of preparing my Permutation Puzzles
Package for publication, and am trying to be sure that absolutely
everything works as intended.  When testing the keystroke equivalents that
I have built into menuPicks by means of the "/W" or "/V" at the ends of the
names of the menu items, I am finding some inconsistent behavior that I
cannot figure out.

My package consists of a standalone called Puzzle Driver which in turn
opens several stacks which present different puzzles.  Because of the way
this needs to work in the Windows version, each puzzle has its own menu
defined, but they are all scripted pretty much the same.  (If I were
implementing this only for the Mac, as far as I can tell, I'd only need one
menu group defined.)

The inconsistent behavior is coming with a "command-plus-W" that I have
associated with the "Close" command of the "File" menu.  My script for
"Close" always asks if the user wants to save changes.  The script for this
menu item sends a closestackRequest message to a handler which also picks
up these messages if the user clicks on the close box at the top of the
window.

For two of my puzzles, this strategy is rock solid.  However for another,
the command+W from the keyboard causes the window to close immediately
without going to my "on closestackRequest" handler.  If one choose "Close"
from the menu, everything works as intended, but not from the keystroke
equivalent.

This behavior is the same on both Mac and Windows, and is the same if I am
running things from a standalone or from within MetaCard.  It is also
curious that if one has done a bit of moving around within the problem
stack, then the keystroke equivalent works as intended.

Any ideas as to what is going on here?  In case it is relevant, I am
working with version 2.3.2 of MetaCard.  I am suspicious that this is a
subtle problem in MetaCard because I have found while scripting that I get
a failure of the keystroke "command+V" for pasting when the menu shows that
it is implemented.

John Kiltinen

PS:  Thanks to all who provided information about generating an e-mail
message from within MetaCard a couple of weeks ago.


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 John Kiltinen (kiltinen at nmu.edu)        Home              Office
 Professor, Dept. of Math. & CS   Tel.(906) 228-8035 or (906) 227-1600
 Northern Michigan University     Fax (906) 228-4667 or (906) 2272010
 Marquette, MI 49855 USA
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++





More information about the metacard mailing list