Palettes and the defaultMenuBar

Graham Samuel livfoss at mac.com
Fri Mar 31 02:50:59 EST 2006


On Thu, 30 Mar 2006 13:07:48 -0800 (PST) ,Jan Schenkel  
<janschenkel at yahoo.com> wrote:
>
> You should be able to set the defaultMenubar to the
> main menbar group of your mainStack upon preOpenStack
> of your standalone.
> That way, any stack that doesn't have its own menubar
> will display the menubar of your mainStack.
> Or have you tried that and it didn't work properly?

Jan - I got hung up on the (to me) strange scope rules in Rev: I had  
called all my menubar groups "Main_Menu", because I imagined I could  
qualify each name with the stack it was in, as in:

   set the menubar of stack "myStack" to grp "Main_Menu" of stack  
"myOtherStack"

but you can't - in fact, if you try, you get a transcript error  
('source is not a container') which was the origin of the remark in  
my original mail. In this context, if in no other, group names have  
to be unique within the whole stack structure, because actually you  
can only write

  set the menubar of stack "myStack" to "Main_Menu"

I wish name scoping in Rev were consistent - the worst issue  
concerning this IMO is not the above, but the fact that you can't  
load two versions of a stack and its substacks into the RR  
environment at the same time, because the names of stacks are not  
qualified by the directory they happen to be in - there is a Bugzilla  
entry about this, but on a quick search I couldn't find it.

What I've done now is to ensure that all my menubar groups have  
unique names, and then it works as you suggest.

Thanks

Graham

PS I also found that you can't set the defaultMenuBar to empty, any  
idea why?



----------------------------------------
Graham Samuel / The Living Fossil Co. / UK and France




More information about the Use-livecode mailing list