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

The Document Architecture

Applications that deal with multiple documents have a lot in common. Every such application can create new documents, open existing documents, save or print open documents, and remind the user to save edited documents when they try to close a window or quit the application. AppKit supplies three classes that take care of most of the details for you: NSDocumentController, NSDocument, and NSWindowController. Together, these three classes constitute the document architecture.

The purpose of the document architecture relates to the Model-View-Controller design pattern discussed in Chapter 1. In RaiseMan, your subclass of NSDocument acts as the window controller. It will have a reference to the model objects, ...

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