Menu Bar in MacOS

David Burgun dburgun at dsl.pipex.com
Mon Apr 19 08:10:40 EDT 2004


Hi,

I am trying to figure out the best way of handling the Menu Bar in MacOS.

My Project is setup like this:

MainStack, does nothing has a couple of Global Cards that contain 
info that the Substacks of the App can use. It also contains some 
common functions that are held in the Stack Script. The window 
associated with this Stack is hidden. So I thought that the best way 
to handle the Menubar would be to include it in the (dummy) main 
stack. I created a MenuBar ok and set the Use as MacOS Menu Bar flag. 
I then put a menuPick handler on each button of the Menubar object. 
However this only works if the top window is the mainStack (which is 
never!). I guess that's what you'd expect! So now I would like to be 
able to have the Menubar/Menu/Item handler in the (dummy) main stack 
to be called regardless of which stack is actually be worked on my 
the user.

Basically what I am asking is how do I share the menu bar with all 
the other stacks (windows) in the App like a regular MacOS 
application?

Thanks in Advance for any Advice
Cheers
Dave


More information about the use-livecode mailing list