menubar confusion

Ben Rubinstein benr_mc at cogapp.com
Wed Nov 26 14:10:58 EST 2025


It's a _very_ long time since I've tried to make a proper desktop app. Please 
help me get my mind back into how menubars work.

Per the dictionary, the value of `the defaultMenubar` is a group reference, 
and the example given is
	set the defaultMenubar to the long ID of group 1 of stack "Menubars"

That makes sense, as it's always "reachable" as long as the owning stack is in 
memory.

But the dictionary says that `the menubar` is just the _name_ of a group.

So is that interpreted on the current card? And does that mean the menubar 
group must be every card of the stack - presumably with backgroundBehavior set?

And the dictionary also says that the menubar takes effect "when a stack is 
the active window". How does this interact with windows that has been opened 
with the 'palette' command? Do they reset the menubar?

And if we want to use a separate sub-stack to hold all our menus - as sort of 
implied by the example given for `the defaultMenubar` - do we need to abandon 
use of 'the menubar', and instead explicitly change `the defaultMenubar` as 
different stacks become active?

TIA for any tips and advice!

Ben


More information about the use-livecode mailing list