Re: Make the action of a NSMenuItem, which has a subMenu, to work
Re: Make the action of a NSMenuItem, which has a subMenu, to work
- Subject: Re: Make the action of a NSMenuItem, which has a subMenu, to work
- From: Dustin Voss <email@hidden>
- Date: Fri, 18 Apr 2003 21:16:25 -0700
On Friday, April 18, 2003, at 05:08 AM, Finlay Dobbie wrote:
On Saturday, April 12, 2003, at 09:40 am, Giovanni Donelli wrote:
Does anybody has a working code for make the make the action of a
NSMenuItem, which has a subMenu, to work???
You can't do this through Cocoa. You have to use the Carbon Menu
Manager. You can get the Carbon handle of a menu with the undocumented
_NSGetCarbonMenu function (see
http://cocoadev.com/index.pl?NSMenu).
Once you have the handle of the menu, you can use
ChangeMenuItemAttributes with the kMenuItemAttrSubmenuParentChoosable
attribute.
However, I don't know where to go from there. I don't know how to
attach a Cocoa action to the now-selectable item.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.