Re: Defer opening documents until app is fully inited
Re: Defer opening documents until app is fully inited
- Subject: Re: Defer opening documents until app is fully inited
- From: "Mills, Steve" <email@hidden>
- Date: Mon, 22 Sep 2014 15:08:01 +0000
- Thread-topic: Defer opening documents until app is fully inited
On Sep 20, 2014, at 08:51:32, Jerry Krinock <email@hidden> wrote:
> I’m surprised that works. I think I was in a similar situation about 4 years ago.
>
> http://www.cocoabuilder.com/archive/cocoa/293279-very-simple-demo-modal-dialog-causes-later-modal-session-to-crash.html?q=applicationWillFinishLaunching+Krinock#293279
I knew that looked familiar; I found the cocoa-dev thread earlier. :)
> To summarize, what worked for me is to
>
> • Create my dialogs or whatever in an doEarlyChores method.
> • Override -application:openFile: to invoke the doEarlyChores method and return NO.
> • Also invoke the doEarlyChores method early in -applicationDidFinishLaunching.
> • Put a lockout in doEarlyChores so it will only do its chores once.
I ended up going at it from the other direction. If we haven't fully initted yet, I save off the files in application:openFiles: and open them later.
--
Steve Mills
office: 952-818-3871
home: 952-401-6255
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please 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