Creating PaperController, a Subclass of NSWindowController
In this section, we will create our initial PaperController class with the method that starts up Evaluator:
Double-click the
PaperWindow.nibfile in PB’s main window to open it up in IB.Select the Classes tab in the
PaperWindow.nibwindow.Select the NSWindowController class (under NSObject — use the Search field if necessary).
Choose the Classes → Subclass NSWindowController menu command, as shown in Figure 11-9.

Figure 11-9. Subclassing NSWindowController
Type Command-1 to display the myWindowController Class Info panel.
Change the name of your new subclass from “MyWindowController” to “PaperController”.
Add a new outlet named “theText” (note that there is already an outlet called “window”).
Select the File’s Owner under the Instances tab in the
PaperWindow.nibwindow.Type Command-5 and change the Custom Class of the File’s Owner to PaperController (because the PaperController will load the
PaperWindow.nibfile).Control-drag from the File’s Owner icon to the text area inside the window and double-click
theTextto make a connection, as shown in Figure 11-10.

Figure 11-10. Connecting File’s Owner to NSTextField inside NSScrollView
Now select the PaperController class under the Classes tab in the
PaperWindow.nibwindow.Choose ...
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