Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Getting mainMenu raises exception
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting mainMenu raises exception



Hi, Mark.

I guess you should do like this:

NSMenu* myMenu = [NSApp mainMenu];

Try it.

--

On 2004/06/26, at 1:19, Mark Munz wrote:

What piece of the puzzle am I missing.

When I try to get the main menu (setup in my MainMenu.nib) from my AppController delegate like such:

- (void) applicationDidFinishLaunching:(NSNotification *)aNotification
{
NSMenu* myMenu = [[NSApp sharedApplication] mainMenu];
}

I get a raised exception. The menu is already being displayed (when I switch back to the app), so it looks like it is set up.

Any insight into this would be much appreciated.

Thanks.

Mark Munz
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


------------------------------------------------------------------------ ---------
hiro FUJIMOTO - developer in Japan.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >Getting mainMenu raises exception (From: Mark Munz <email@hidden>)



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

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.