• 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
Turning NSMenuItem into separator
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Turning NSMenuItem into separator


  • Subject: Turning NSMenuItem into separator
  • From: Thom McGrath <email@hidden>
  • Date: Thu, 29 Sep 2005 20:51:22 -0400

I'm building a dynamic menu using
- (BOOL)menu:(NSMenu *)menu updateItem:(NSMenuItem *)item atIndex: (int)index shouldCancel:(BOOL)shouldCancel
- (int)numberOfItemsInMenu:(NSMenu *)menu
in a menu delegate. So far, everything is working well. Much easier than REALbasic :P - but I'm running into an issue. I need one of the items to be a separator. The only way I can see to do that is to create a new NSMenuItem. But I'm already handed a menu item to use. I've tried releasing it and creating a new one in it's place, but nothing is working and not crashing.


How do I do this?


-- Thom McGrath Lead Programmer of The ZAZ Studios <http://www.thezaz.com>

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Turning NSMenuItem into separator
      • From: Andy Lee <email@hidden>
    • Re: Turning NSMenuItem into separator
      • From: Andreas Mayer <email@hidden>
  • Prev by Date: Re: NSEnumerator and the missing peek method
  • Next by Date: NSApp beginsheet beeps!
  • Previous by thread: 2 problems with NSOutlineView
  • Next by thread: Re: Turning NSMenuItem into separator
  • Index(es):
    • Date
    • Thread