• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Getting mainMenu raises exception
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting mainMenu raises exception


  • Subject: Re: Getting mainMenu raises exception
  • From: Mark Munz <email@hidden>
  • Date: Fri, 25 Jun 2004 11:23:54 -0600

Thanks.

I knew NSApp was a shortcut, but somehow got it stuck in my head that it was for NSApplication.
Too many things in my head, some are going to start falling out. :-)

Mark

On Jun 25, 2004, at 11:14 AM, Yann Bizeul wrote:

You should try [NSAPP mainMenu]

As I remember, NSApp is a shortcut to [NSApplication sharedApplication]

Le 25 juin 04, ` 18:19, Mark Munz a icrit :

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.



--
Yann Bizeul - yann at tynsoe.org
http://projects.tynsoe.org/
_______________________________________________
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>)
 >Re: Getting mainMenu raises exception (From: Yann Bizeul <email@hidden>)

  • Prev by Date: Re: Capturing keydown events in an NSImageView?
  • Next by Date: Re: Capturing keydown events in an NSImageView?
  • Previous by thread: Re: Getting mainMenu raises exception
  • Next by thread: Re: Getting mainMenu raises exception
  • Index(es):
    • Date
    • Thread