• 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: [NSApp mainMenu] = null!!!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [NSApp mainMenu] = null!!!


  • Subject: Re: [NSApp mainMenu] = null!!!
  • From: "Julien Jalon" <email@hidden>
  • Date: Sun, 21 Jan 2007 01:06:58 +0100

NSApp = [NSApplication sharedApplication];

You are trying to assign something to NSApp? How odd.

NSApp is a global var that already points to [NSApplication sharedApplication].

You should not redefine NSApp as you do with this line (so the assertion).

--
Julien

On 1/20/07, Daniel R. Killoran,Ph.D. <email@hidden> wrote:
Just prior to this call, I tried calling

        NSApp = [NSApplication sharedApplication];

and got

         *** Assertion failure in -[NSApplication init], AppKit.subproj/
NSApplication.m:1023
         Creating more than one Application

Besides, I think NSApp is supposed to be zero before being set by
NSApplication, and it isn't.

Dan Killoran


On Jan 20, 2007, at 2:56 PM, Sherm Pendley wrote:

> On Jan 20, 2007, at 9:57 AM, Daniel R. Killoran,Ph.D. wrote:
>
>> What is the significance of
>>
>>      theMenu = [NSApp mainMenu];
>>
>> returning theMenu = 0 ???
>
> Could be you're calling -mainMenu too early in your app's lifespan,
> before NSApp has been pointed to the shared NSApplication instance.
> A message sent to nil will return nil.
>
> sherm--
>
> Web Hosting by West Virginians, for West Virginians: http://wv-www.net
> Cocoa programming in Perl: http://camelbones.sourceforge.net
>
>
>

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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


References: 
 >[NSApp mainMenu] = null!!! (From: "Daniel R. Killoran,Ph.D." <email@hidden>)
 >Re: [NSApp mainMenu] = null!!! (From: Sherm Pendley <email@hidden>)
 >Re: [NSApp mainMenu] = null!!! (From: "Daniel R. Killoran,Ph.D." <email@hidden>)

  • Prev by Date: Re: setNeedsDisplayInRect and performSelectorOnMainThread?
  • Next by Date: Re: Relationship between -isEqual and -hash
  • Previous by thread: Re: [NSApp mainMenu] = null!!!
  • Next by thread: Synchronized NSTableViews
  • Index(es):
    • Date
    • Thread