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: Jerry Krinock <email@hidden>
- Date: Tue, 06 May 2014 12:21:35 -0700
On 2014 May 06, at 11:23, Mills, Steve <email@hidden> wrote:
> How can we prevent this poor design choice from happening?
How about: Subclass NSDocumentController and override -[NSDocumentController reopenDocumentForURL:withContentsOfURL:display:completionHandler:]. I think that, to get your subclass to to be used by the app, all you need do is instantiate one in the main nib. It looks like that’s all I’ve done, and it works for me. If it doesn’t work for you, let us know and I’ll check my code more carefully.
That being said, as Kyle and Quincey have noted, you might still have trouble with that “early" modal dialog. You may need to do that override *and* delay displaying your modal dialog.
_______________________________________________
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