Revisiting MVC

Now that you’ve laid out your user interface, let’s have a look at the object diagram for this project:

Figure 28.15  Object diagram for TahDoodle

Object diagram for TahDoodle

NSDocument, the superclass from which your BNRDocument class inherits, is an interesting beast. At first glance, it appears to be a model object. If you look up the class reference for NSDocument, though, you’ll discover that it’s more of a controller than anything else. NSDocument coordinates various disk-related activities and connects directly to the views responsible for issuing user input. When you create the NSDocument subclass BNRDocument, you added pointers to the real model objects (an NSMutableArray of NSString objects).

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset