> On Mar 19, 2014, at 9:43 AM, Quincey Morris > <quinceymor...@rivergatesoftware.com> wrote: > >> On Mar 19, 2014, at 04:30 , Colas B <colasj...@yahoo.fr> wrote: >> >> I will look in the direction of ‘performSelector’ if (when) I want to save >> these initial data repairings. Another possible issue might be that the >> delay is not long enough and the `saveDocument:` creates a deadlock. This is >> an unlikely situation if the delay is 10 seconds. Is there a way to detect >> when we are in such a situation? > > I’d suggest you do it (with a delay of 0) in an override of -[NSDocument > windowControllerDidLoadNib:]. At that point, the NSDocument initialization > process is basically over, as is the work of opening the document window > (which likely involves disk accesses to read the NIB file).
This doesn’t sound like a good idea to me. There is no guarantee that opening an NSDocument will cause it to create an interface—see AppleScript, printing from the Finder’s contextual menu, etc. A much more appropriate place to do this would be in a subclass of NSDocumentController. --Kyle Sluder _______________________________________________ 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