On 09.04.2009, at 01:55, Rua Haszard Morris wrote:
still, I was expecting a line or two of code, not to have to make an instance variable for things I want out of the nib!

I'm still shocked there's no standard way to do this...


I think you're taking the wrong approach, conceptually. Usually, you have a controller, so you can just create a controller that loads a NIB and point the outlet at the menu. Create a new instance of this controller each time, not just the menu. Your app-specific logic for the menu should be in that (menu-specific) controller anyway.

Alternately, instead of loading a new menu each time, just copy the menu. It supports the NSCopying protocol, after all.

As always, we are back to Cocoa's rule #1: If something seems to be incredibly complicated or impossible to do in Cocoa, you're doing it the wrong way. Cocoa encourages good designs.

Cheers,
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de





_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to