• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Make the action of a NSMenuItem, which has a subMenu, to work
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.
References: 
 >Re: Make the action of a NSMenuItem, which has a subMenu, to work (From: Finlay Dobbie <email@hidden>)

  • Prev by Date: Re: nsuserdefaults and bools.
  • Next by Date: Re: memory. and a lot of continual small object allocations and deallocations.
  • Previous by thread: Re: Make the action of a NSMenuItem, which has a subMenu, to work
  • Next by thread: RE: Duplicating Apple search field UI
  • Index(es):
    • Date
    • Thread