Re: Main menu in NSDocument based application
Re: Main menu in NSDocument based application
- Subject: Re: Main menu in NSDocument based application
- From: Lee Ann Rucker <email@hidden>
- Date: Mon, 31 Jan 2011 14:39:49 -0800
- Acceptlanguage: en-US
- Thread-topic: Main menu in NSDocument based application
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 (email@hidden)
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:
This email sent to email@hidden