Cocoa Programming for OS X: The Big Nerd Ranch Guide
by Aaron Hillegass, Adam Preble, Nate Chandler
For the More Curious: Automatic Document Saving
In Mac OS X Lion (10.7), Apple introduced automatic document-saving support to Cocoa. With automatic document saving, your users will no longer need to be concerned with manually saving their documents. By monitoring the change count (described later), Cocoa will cue your document to save itself at appropriate times. When the user does manually save the document, a new version will be created. The user can then browse past versions by using an interface similar to Time Machine. Untitled documents (documents not explicitly saved by the user) will even be preserved between runs of your application.
In order to support automatic document saving, your NSDocument subclass must opt in by ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access