Last Menubar Problem - or The Incredible Shrinking Stack!

David Burgun dburgun at dsl.pipex.com
Mon Apr 25 05:53:44 CDT 2005


Hi,

I've got my menu bar handling working except I have one annoying 
problem. This is how my app work:

I have a Stack (call it StackA) that may be called from the MainMenu 
(in which case the MainMenu stack sends an event to the target stack 
with the long name of the MainMenu Group. This works fine.

However, if StackA can also be loaded from other places that don't 
supply a menu. In this case StackA uses it's own menu.

This works fine too.

The only problem I have left is that in the closeStack handler of 
StackA I have the following:

--
--  Delete the Imported Menubar if there is one
--
set the menubar of this stack to "InternalMenuBar",
get DeleteMenuBar(the cpImportedMenu of this stack) <-- deletes the 
menubar if not empty, is empty if there is no imported menubar.
set  the cpImportedMenu of this stack to empty

And this causes the Stack to shrink by the height of the menu bar 
each time the stack is closed! Since the stack is saved after this 
(cos I don't want the imported menubar hanging around).

Any ideas of how to get around this?

Thanks a lot
Dave


More information about the use-livecode mailing list