dancing popup menus
ambassador at fourthworld.com
Wed Aug 18 16:47:23 EDT 2004
Meitnik at aol.com wrote:
> Anyone else having the IDE popup menus suddenly change to someone's else
> popup menus within the IDE?? Its driving me crazy. I cant find any pattern so far.
> I try to force IDE to make up its mind but sometimes i just have to close the
> IDE and reopen it. Any work arounds welcomed.
I've seen this in the MC IDE, and have had to modify it to help prevent
it. However scripting style plays a role here, so an IDE can only do so
much to preserve itself:
The issue is a Transcript convenience which allows you to refer to menu
button objects by simply using the keyword "menu" as a shorthand for a
complete button reference, so you can say things like:
put tMyMenuItems into menu "Edit"
put tMyMenuItems into btn "Edit" of stack "MyMenuBar"
When using the shorter "menu" reference, it assumes you're taking about
a button of that name within the group which is currently the
However, if you have an app which changes the defaultMenuBar, unless
scripts check to see which defaultMenuBar is active then modifying menu
contents with the shorter "menu" reference may modify the wrong object.
To correct this in the MC IDE I've changed the scripts to use only
explicit object references (the second form shown above). While the
"menu" form can be a great convenience when porting HC stacks, that
convenience comes at the price of ambiguity. More explicit references
to menu buttons will make for more robust systems.
I don't know if the Rev IDE uses the "menu" form in their scripts, or if
they use only explicit references like we now use with the MC IDE. If
Rev uses only explicit references it may be the case that one of your
scripts or perhaps those in a plugin are not checking the defaultMenuBar
before modifying things, so the interpreter faithfully does what it's
told even if it may not be what you want. :)
Fourth World Media Corporation
Ambassador at FourthWorld.com http://www.FourthWorld.com
More information about the Use-livecode