I have some sample code at:

http://ericgorr.net/cocoadev/UtilityMenu.zip

According to the documentation in "Application Menu and Pop-up List Programming 
Topics for Cocoa", to get mutually exclusive states, one my manage this oneself:



You can use states to implement a group of mutually exclusive menu items, much 
like a group of radio buttons. For example, a game could have three menu items 
to show the level of play: Beginner, Intermediate, and Advanced. To implement a 
such a group, create one action message that they all use. This action message 
changes the appropriate setting, and then reflects that change by unchecking 
the currently checked item and checking the newly selected item.
In an action method that responds to all commands in the group use setState: to 
uncheck the menu item that is currently marked:
[curItem setState:NSOffState];
Then mark the newly selected command:
[sender setState:NSOnState];



However, when my menu item is selected, I just turn it's state on and do 
nothing else (for now).

Why is the state of the previously selected items being set to off?

Any idea?

Thank you.








_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to