Re: pb with awakeFromNib
Re: pb with awakeFromNib
- Subject: Re: pb with awakeFromNib
- From: Fritz Anderson <email@hidden>
- Date: Tue, 19 Jun 2007 07:24:33 -0500
On 19 Jun 2007, at 5:59 AM, julien ricard wrote:
I want to launch a quite long process automatically when my cocoa
application is opened. I launch it in awakeFromNib, but the window
does not open before my process is finished. I'd like my application
to be usable while that process is running. How can I do it?
I'd like more detail.
How are you running the process? Through NSTask?
If NSTask, I assume you are not sending -waitUntilExit?
How, if at all, are you dealing with stdout and stderr?
I presume the process does something necessary to the running of your
program. What does your program do before the necessary thing has
been done?
As an aside: I am leery of performing one-shot actions in
awakeFromNib, if it can be helped at all. An owner of NIBs gets this
message whenever any of its NIBs gets (re)loaded. I've found it easy
to add a NIB to a class, and forget that I've just bought an extra
call to awakeFromNib. See if it's a good idea to move your launch to
applicationWillFinishLaunching: or applicationDidFinishLaunching: .
— F
_______________________________________________
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