Moon Travel Planner: Modifying the Default Window
The main window for the Moon Travel Planner application you created in Chapter 3 is rather boring at this point. It shows nothing and is named Window. It will take a few chapters to whip this window into shape so it looks like the sketch in Chapter 2. In this section we’ll get started by doing the following:
Open Interface Builder.
Revise the window title so it says something other than “Window.”
Set Window Class, Controls, and Attributes.
Set the window’s size.
Build and run the application to make sure it still works after our modifications.
Open Interface Builder
The Interface Builder application is located in the /Developer/Applications folder. Although you can double-click the Interface Builder icon to open it, we’ll open Interface Builder from within Project Builder. Most of the time you’ll have both open and move between them as you modify the interface and add code.
To open Interface Builder from within Project Builder:
Open the Moon Travel Planner project if it is not already open.
Double-click the
main.nibfile, located in the Resources group.
Revise the Window Title
The window’s title is the text shown in the title bar (see Figure 4.6). You should change the title from Window to Moon Travel Planner:
Double-click the MainWindow icon in the Instances pane.
Choose Show Info from the Tools menu.
Type
Moon Travel Plannerin the Title text field, as shown in Figure 4.9 and press Return.Figure 4-9. The title bar attribute for a window ...
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