On Jan 31, 2011, at 2:25 PM, Bruce Cresanta wrote:

> Hello,
> 
>       I've been scouring through the docs trying to figure out how to get a 
> reference to the main menu in an NSDocument based app.    I need to make 
> programmatic changes to the menu depending on which NSDocument is key.   
> Would you please help me find a pointer to the main menu?

NSDocument validateUserInterfaceItem: will probably give you everything you 
need. There's seldom a need to update a menu before it asks to be updated. 

If you find you must use the main menu, the method you need is conveniently 
named mainMenu. One of my favorite tricks for finding new things is to set 
XCode's documentation search mode to "prefix" and type something 
likely._______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Reply via email to