Re: Document being reopened on launch during modal dialog
Re: Document being reopened on launch during modal dialog
- Subject: Re: Document being reopened on launch during modal dialog
- From: Quincey Morris <email@hidden>
- Date: Tue, 06 May 2014 12:26:40 -0700
On May 6, 2014, at 11:55 , Mills, Steve <email@hidden> wrote:
> We're in [FinaleAppDelegate applicationWillFinishLaunching:] (like you mentioned later), which is where we call our cross-platform InitApp function to load things up, set up audio, etc. The audio engine has discovered a sample rate mismatch and is telling the user about it via modal dialog.
I see. But it seems unreasonable to expect that the app won’t finish launching regardless of the modal dialog. (It may even be *necessary* for it to finish launching in order for the modal dialog to work.) So it comes down to a question of a technical violation of runModalForWindow’s event loop blocking, keeping in mind that state restoration likely isn’t triggered by an event at all.
Given that a sample rate mismatch sounds like a global condition, I think the “theoretically” correct solution is to change your document’s behavior so that it can exist under the mismatch condition without getting messed up (and perhaps also without fully functionality). However, I don’t imagine you’d contemplate doing that, so I’d suggest instead that you simply override '[NSDocumentController reopenDocumentForURL:…]’ and put its parameters on a queue so that you can re-issue the request from ‘applicationDidFinishLaunching:’.
_______________________________________________
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