Implementing the About Panel in MathPaper
In this section, we’ll start implementing the animated About panel that we discussed earlier in the MathPaper application. The first thing we’ll do is to add a new module for the About panel’s nib file and arrange for the nib to be loaded automatically the first time the user chooses the MathPaper → About MathPaper menu command. (Recall that it’s more efficient to use a separate nib module for an About panel, as we did in our four-function Calculator in Chapter 6. Then the nib needs to be loaded into memory only if it’s used, and About panels aren’t used very often.)
Open
MathPaper.pbprojin Project Builder.Double-click on
MainMenu.nibin the Groups & Files pane of PB’s main window to open this nib file in IB.Choose IB’s File → New menu command, select Cocoa → Empty in the Starting Point panel, and then click the New button.
Choose IB’s File → Save menu command and save the new nib with the name
AboutPanel.nibin your~/MathPaper/English.lprojfolder (not the~/MathPaperfolder). When prompted, add this file to the MathPaper project, as shown in Figure 14-2.

Figure 14-2. Adding AboutPanel.nib to the MathPaper project
Note that the File’s Owner of the
MainMenu.nib file is an instance of the
NSApplication class (to see this in IB, click
MainMenu.nib’s
File’s Owner icon and type Command-1). Also note
that by default, the MathPaper → About MathPaper ...
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