I just got back to this problem (after watching the WWDC11 Resume and Automatic 
Termination video). I added an additional override and license check in:

-[NSDocumentController 
reopenDocumentForURL:withContentsOfURL:display:completionHandler:]

And now my modal window displays before the restored document is opened.
Hope this helps with your case.

Dave

On 2011-07-27, at 8:11 PM, Sean McBride wrote:

> On Jul 27, 2011, at 19:39, Dave Fernandes wrote:
> 
>> License agreements are still a necessity. This seems to be what the OP is 
>> asking about, and not simply a marketing splash screen.
> 
> Thanks for the on-topic reply!  (Sad that even though I anticipated the 
> 'don't do that comments', they still came.)
> 
>> I used to put this check in my document controller's 
>> openUntitledDocumentAndDisplay:error: and 
>> openDocumentWithContentsOfURL:display:error: methods. Unfortunately, these 
>> methods are not called for restored windows.
> 
> Indeed.  I used to do something similar (don't recall exactly, the code is at 
> work).
> 
> So I take it you are in the same boat?
> 
> Perhaps the open AppleEvents themselves could be intercepted, queued, and 
> processed later... any other ideas?
> 
> Sean
> 

_______________________________________________

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

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

Reply via email to