This may be obvious, but did you try moving it all to 
applicationDidFinishLaunching: instead? We used to have alerts in willFinish 
too, but now we have comments saying not to do that instead :)

On May 6, 2014, at 11:23 AM, Mills, Steve wrote:

> I'm looking at a crash log for our app that shows our app is initting. During 
> init ([NSApplication finishLaunching]) we discover a problem and put up a 
> modal dialog using [NSApplication runModalForWindow:]. During this modal run 
> loop, something has decided that it would be a great time to handle the 
> reopen event, so [NSDocumentController 
> reopenDocumentForURL:withContentsOfURL:display:completionHandler:] is called 
> and we open a document while the modal dialog is up, and before we've totally 
> finished handling [NSApplication finishLaunching].
> 
> Why would reopen choose to be handled during a modal dialog loop? How can we 
> prevent this poor design choice from happening?
> 
> --
> Steve Mills
> office: 952-818-3871
> home: 952-401-6255
> 
> 
> _______________________________________________
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> 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:
> https://urldefense.proofpoint.com/v1/url?u=https://lists.apple.com/mailman/options/cocoa-dev/lrucker%2540vmware.com&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=yJFJhaNnTZDfFSSz1U9TSNMmxGyib3KjZGuKfIhHLxA%3D%0A&m=5hE6RPo7b8GdoEomoXXIy6%2BmbRDzf%2BzEt%2FQH6IBflY8%3D%0A&s=51568acfd995c5fc420799da6c8d5fc8704e29066c2d20f039e7d8ef7ab57d0a
> 
> This email sent to lruc...@vmware.com


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to