Menubar Handling

David Burgun dburgun at dsl.pipex.com
Thu Apr 6 07:47:44 EDT 2006


Hi,

Yes, that's the way I was thinking. One thing though, this works for  
enabling and disabling menu items or whole menu's depending on the  
current Stack or Card, but what about changing menu items? This can  
get quite complex, for instance, say I have a Main App Stack (Call is  
MainApp) and a number of Stacks that are called from the Main App,  
like a Preferences Stack or an Image Editor Stack.

MainApp takes over the "File:Open" menu item and changes it to  
"File:Import" and sets a handler to call when this action is taken.  
However one of the others stacks can open a file and want's the Menu  
Item to be "File:Open".

Another example is when a whole Menu wants to change (leaving some  
Menu's alone), like in the RunRev IDE when you have a Stack Window at  
the Front you get one set of menu's and when you have the Script  
Editor in front you get another set, but some menu's are left "as is"  
like the "Edit, Windows and Help Menu's).

Any ideas?

All the Best
Dave

On 5 Apr 2006, at 21:27, Dan Shafer wrote:

> David......
>
> Perfect place to use custom properties, I think. You could  
> generalize this
> nicely. Say, e.g., you have a custom property for each card called
> menuItemsToDisable. It contains a list of the menu items to be  
> disabled when
> that card opens. Then in the opencard handler you just grab that  
> custom
> property and iterate over it in a loop. Voila!
>
>
> On 4/5/06, David Burgun <dburgun at dsl.pipex.com> wrote:
>
> Ok, but what if you want different Menu entries depending on which
> stack in the "topstack" ? Also how do you enable/disable menu items
> depending on which stack/card/whatever is in control?
>
>
> --
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Dan Shafer, Information Product Consultant and Author
> http://www.shafermedia.com
> Get my book, "Revolution: Software at the Speed of Thought"
>> From http://www.shafermediastore.com/tech_main.html
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list