OSX menubars
Posted: Mon Jul 26, 2010 2:24 am
Looking for some assistance on manipulating menubars on OSX.
I've set up the menus using the Menu Builder Tool and they all appear on the OSX menubar at the top of the screen. The menubar is defined on the main stack of my application and is the default menu for the whole application.
When I'm in other substacks of the app, I need to be able to enable and disable selected menu items depending on data conditions and I see there are enable and disable commands in Rev to do that. However, my menus have cascading items and it appears that if I enable a submenu item, I also need to enable the menu item that it belongs to. The catch 22 is that if I enable the owning menu item, it enables ALL it's submenus which is not what I want to do.
Here's an example using a menu named Menu1; it has the following structure:
Menu Item 1
Submenu item 1.1
Submenu item 1.2
Menu Item 2
Submenu item 2.1
Submenu item 2.2
Let's say that Menu item 1 is disabled and I want to enable just submenu item 1.1. If I enable submenu item 1.1, I still can't get to it because Menu item 1 is still disabled. But if I enable Menu Item 1 then both submenu item 1.1 AND submenu item 1.2 are enabled. The problem gets more complex if there is more than one level of submenus.
It seems that the Rev enable and disable commands won't do the job for me and it sounds like I'll have to write my own handlers to deal with this situation which sounds like ti could be a real pain so I'm hoping someone else has dealt with this situation in the past and would be willing to share the code. I need it to be as general purpose as possible since I need to deal with several different menus from several different stacks.
Help!
Pete
I've set up the menus using the Menu Builder Tool and they all appear on the OSX menubar at the top of the screen. The menubar is defined on the main stack of my application and is the default menu for the whole application.
When I'm in other substacks of the app, I need to be able to enable and disable selected menu items depending on data conditions and I see there are enable and disable commands in Rev to do that. However, my menus have cascading items and it appears that if I enable a submenu item, I also need to enable the menu item that it belongs to. The catch 22 is that if I enable the owning menu item, it enables ALL it's submenus which is not what I want to do.
Here's an example using a menu named Menu1; it has the following structure:
Menu Item 1
Submenu item 1.1
Submenu item 1.2
Menu Item 2
Submenu item 2.1
Submenu item 2.2
Let's say that Menu item 1 is disabled and I want to enable just submenu item 1.1. If I enable submenu item 1.1, I still can't get to it because Menu item 1 is still disabled. But if I enable Menu Item 1 then both submenu item 1.1 AND submenu item 1.2 are enabled. The problem gets more complex if there is more than one level of submenus.
It seems that the Rev enable and disable commands won't do the job for me and it sounds like I'll have to write my own handlers to deal with this situation which sounds like ti could be a real pain so I'm hoping someone else has dealt with this situation in the past and would be willing to share the code. I need it to be as general purpose as possible since I need to deal with several different menus from several different stacks.
Help!
Pete