On Oct 10, 2014, at 13:34 , Matthew LeRoy <mle...@minitab.com> wrote:

> Not entirely sure where to go from here.

It’s not clear to me whether the deferral of the open panel’s disappearance is 
a mere implementation detail of NSDocumentController, or if it’s a consequence 
of what you chose to do in your completion handler.

I think I’d be inclined to sacrifice a bit of time to experiment with handling 
the open panel yourself, in advance of diving into NSDocumentController, at 
least for the handling of passwords. That is, provide your own action method in 
place of ‘openDocument:’ for the relevant menu item. Then you can ‘orderOut:’ 
the open panel exactly when you want, and any duplication of effort may be less 
(in terms of development time and pain) then “customizing” the behavior of 
NSDocumentController.

Also keep in mind the other possibility: have your ‘readFromURL:’ method defer 
the password checking and the reading of the document until the window is open 
(and do the password interaction as a sheet on that window). That might also be 
worth a bit of time to experiment, even if it turns out to be infeasible.



_______________________________________________

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