Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Turning NSMenuItem into separator



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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.