chh9@quads.uchicago.edu (Conrad Halton Halling) (03/10/91)
Ten days ago I obtained HyperCard 2.0v2 from the file server here at the
University, where we have a site license. Before I continue, I want to say
that 2.0 is a wonderful improvement on 1.2.x; the new features have solved
alot of problems I had with scripting. I think the HyperCard team of
programmers should be congratulated on producing such a wonderful product.
I have observed what I would consider unexpected behavior in 2.0v2 (with
System 6.0.5 on an SE with 2.5 MB), and I want to know if the following are
bugs (i.e., the behavior is unintended) or if they are "undocumented features"
(i.e., the behavior is intended but not documented). Please don't ask me to
RTFM, because I don't have TFM, just the help stacks :-).
I have a stack of cards, each of which permits access to another stack. I do
not want the user to be able to delete or cut a card without deleting the
associated stack, nor do I want the user to create a new card or paste a card
since such a card would have no associated stack. I thought I could prevent
this by disabling menuItems "New Card", "Delete Card", "Cut Card", and "Copy
Card" of menu "Edit". This is where the problems begin.
o Although I am able to disable menuItems of the "File" and "Go" menus,
disable does not work with "New Card", "Delete Card", or "Cut Card" of the
"Edit" menu. I am able to disable "Copy Card". I can disable the entire
"Edit" menu, but I need to retain access to the other menuItems. Although I
can't disable them, it is possible to delete "New Card", "Delete Card", and
"Cut Card" from the "Edit" menu (but this causes new problems, as described
below).
o On the "Menu Behavior" card of the "Help Extras" stack, it says:
You can use the set, get, put, delete,
enable, and disable commands with
menus that arenUt currently visible
(perhaps because the menu bar is
hidden, the user level is set too low, or a
different tool is chosen).
I know it doesn't say so, but I would think that you could use the set, get,
etc. commands with menuItems that aren't currently visible because the user
level is set too low. However, I can't delete menuItem "Copy Card" of
menu "Edit" when the userLevel is 2.
o It gets more bizarre. If you delete menuItem "Cut Card" from menu
"Edit", then set the userLevel to 2, the menu no longer includes the "Cut"
command. So you can't even cut text from the message box. Similarly, if
you delete menuItem "Copy Card" from menu "Edit", then set the userLevel to
2, you lose the "Copy" command. So deleting these unwanted menuItems
doesn't help me.
My solution, which is not as elegant as it should be, is to (1) set the
cantDelete of all cards of the stack to true to block the "Cut Card" and
"Delete Card" commands; and (2) to intercept any "New Card" or "Paste Card"
commands with a doMenu handler and provide some sort of warning to the user.
It would be much more desirable if I could simply disable the menuItems.
Other problems I have encountered:
o I have changed the first menuItem of menu 1 (the apple menu) from "About
HyperCard..." to "About myStackName...". When the user chooses this
menuItem, my stack goes to a special card describing itself. However, I
cannot intercept "About myStackName..." in a doMenu handler, but I can
intercept "About HyperCard...". The Help Stacks don't seem to document this
subtlety.
o If you are working with more than one window, you can't disable menuItem
"Next Window" of menu "Go".
--
Con Halling
chh9@midway.uchicago.edu