O'Reilly logo

Cocoa Programming for OS X: The Big Nerd Ranch Guide by Aaron Hillegass, Adam Preble, Nate Chandler

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required