• 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 mainWindow]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [NSApp mainWindow]


  • Subject: Re: [NSApp mainWindow]
  • From: Matthew Formica <email@hidden>
  • Date: Tue, 25 Feb 2003 10:47:22 -0800

It sounds to me like the window hasn't yet been created at
applicationDidFinishLaunching time. I suggest you move the code that needs
-mainWindow to be valid to a later point; perhaps try setting up a timer to
fire once in .01 seconds or something. Essentially, when it goes through
the event loop again, the window will be created, and everything after that
will work fine.

- Matthew

******************************************************************
Explore the next generation of technology innovation from Apple.
Worldwide Developers Conference 2003, May 19-23.
Visit http://developer.apple.com/wwdc
******************************************************************

On 2/25/03 12:42 AM, "Dennis Munsie" <email@hidden> wrote:

> I have a question regarding the [NSApp mainWindow] call -- I'm trying
> to call this in my -didApplicationFinishLaunching: delagate, and it
> always comes back as null. When should this be set?
>
> My app has a single main window, with a few utility panels tossed in.
> It's not document based at all. Could this be the reason why it's not
> set?
>
> I'm going to workaround my current problem by just defining another
> outlet, but it seems kinda silly with mainWindow method available. :)
>
> dennis
> _______________________________________________
> 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.
_______________________________________________
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: 
 >[NSApp mainWindow] (From: Dennis Munsie <email@hidden>)

  • Prev by Date: NSTableView with varying row heights
  • Next by Date: PBI: tear-off tab items?
  • Previous by thread: [NSApp mainWindow]
  • Next by thread: Re: cocoa-dev digest, Vol 2 #1962 - 14 msgs
  • Index(es):
    • Date
    • Thread