On Apr 15, 2013, at 13:49 , Steve Mills <[email protected]> wrote:

> I have the following overrides in my NSDocument subclass:

> […]

You didn't mention "autosavesInPlace". This is the one to override if you don't 
want any (new-style) autosaving.

> The data was never saved anywhere, so opening a new document is the wrong 
> thing for the OS to do.

No, that's not true when "autosavesInPlace" is YES. In that case, if the app 
has a window open when it quits, it should and will open a window when it 
re-starts. If autosave has never completed, it'll be a new, untitled window.

Having said that, things get a bit more complicated when you kill the app 
during debugging. It's a bit unpredictable what restorable state has been 
saved, and whether it'll successfully restore. You can turn off the "Launch 
application without state restoration" option in the Run action of the scheme, 
which make help you out during debugging, though that of course won't prevent 
the behavior in normal usage for your users.


_______________________________________________

Cocoa-dev mailing list ([email protected])

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 [email protected]

Reply via email to