Re: [NSApp mainWindow]
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.