• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Restoring unsaved docs does wrong thing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Restoring unsaved docs does wrong thing


  • Subject: Re: Restoring unsaved docs does wrong thing
  • From: Quincey Morris <email@hidden>
  • Date: Mon, 15 Apr 2013 14:19:17 -0700

On Apr 15, 2013, at 13:49 , Steve Mills <email@hidden> 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@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


References: 
 >Restoring unsaved docs does wrong thing (From: Steve Mills <email@hidden>)
 >Re: Restoring unsaved docs does wrong thing (From: Quincey Morris <email@hidden>)
 >Re: Restoring unsaved docs does wrong thing (From: Steve Mills <email@hidden>)

  • Prev by Date: Re: Restoring unsaved docs does wrong thing
  • Next by Date: Re: Core Data grinds for 30 min saving SQLite. 10.6 Bug?
  • Previous by thread: Re: Restoring unsaved docs does wrong thing
  • Next by thread: Re: Restoring unsaved docs does wrong thing
  • Index(es):
    • Date
    • Thread