Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 12. NIB Files and NSWindowContro... > Adding a Panel to the Application

Adding a Panel to the Application

The Preferences panel that you are going to add will not do anything except appear for now. In Chapter 13, however, you will learn about user defaults and will make the Preferences panel do something.

The Preferences panel will be in its own NIB file. You will create a subclass of NSWindowController called PreferenceController. An instance of PreferenceController will act as the controller for the Preferences panel. When creating an auxiliary panel, it is important to remember that you may want to reuse it in the next application. Creating a class to act just as a controller and a NIB that contains only the panel makes it easier to reuse the panel in another application. Hip programmers would say, “By making the application more modular, we can maximize reuse.” The modularity also makes it easier to divide tasks among several programmers. A manager can say, “Rex, you are in charge of the Preferences panel. Only you may edit the NIB file and the preference controller class.”


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint