If wanting to build a menu on the fly I've been using the menuNeedsUpdate delegate method. The docs clearly state you can add/remove items this way.
https://developer.apple.com/library/mac/documentation/cocoa/reference/NSMenuDelegate_Protocol/Reference/Reference.html#//apple_ref/occ/intfm/NSMenuDelegate/menuNeedsUpdate: ___m i c h a e l s t a r k e____ geschäftsführer HicknHack Software GmbH www.hicknhack-software.com ___k o n t a k t____ +49 (170) 36 86 1 36 [email protected] ___H i c k n H a c k S o f t w a r e G m b H____ geschäftsführer - maik lathan | andreas reischuck | michael starke bayreuther straße 32 01187 dresden amtsgericht dresden HRB 30351 sitz - dresden > On 07.04.2014, at 12:43, Jonathan Taylor <[email protected]> > wrote: > >> On 7 Apr 2014, at 11:25, Keith J. Schultz wrote: >> >> Hi Jonny, >> >> try Menu items on the fly! >> >> To my knowledge you can not use IB! > > Thanks for your reply keith. I hadn't tried those search terms, but no that > didn't get me anything relevant either. All I could find was one old thread > in which various conflicting advice is given and it is reported that one > promising approach results in crashes: > http://www.cocoabuilder.com/archive/cocoa/29044-cocoa-building-menu-on-the-fly.html > > However, more blind searching around has led me to NSMenuDelegate, which > looks to me what I want... > _______________________________________________ > > Cocoa-dev mailing list ([email protected]) > > 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: > https://lists.apple.com/mailman/options/cocoa-dev/michael.starke%40hicknhack-software.com > > This email sent to [email protected] _______________________________________________ Cocoa-dev mailing list ([email protected]) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
