Version 13 (modified by mikel, 13 years ago) (diff)


Building the User Interface on "Tiger"

This page is under construction.

If you are using Mac OS X 10.4.x ("Tiger") to build your application, then the Apple tutorial's section on building the UI may be somewhat confusing. Apple's tutorial uses InterfaceBuilder 3.x to show how to build an interface, and there were many interface changes between versions 2.x and 3.x of InterfaceBuilder. In this section we see how to build the UI using InterfaceBuilder 2.x.

Launch InterfaceBuilder

Start by locating Apple's InterfaceBuilder application. If you installed Apple's Developer Tools, InterfaceBuilder should be in the folder "/Developer/Applications/?":

Where to find !InterfaceBuilder

NOTE: If you have not installed Apple's Developer Tools, you should do that now. You will not be able to build the CurrencyConverter example without them. The Developer Tools are distributed as an optional install with Mac OS X 10.4 ("Tiger"). Look for the "XCode Tools" package in the "Optional Installs" folder on the Mac OS 10.4 install disk.

Once you have located InterfaceBuilder, double-click to launch the application. InterfaceBuilder presents a window you can use to choose a template for the nibfile you are going to create.

The !InterfaceBuilder Starting Point window

Make sure the "Application" option is selected in the "Cocoa" section and click the "New" button to create a new nibfile. InterfaceBuilder creates a new application nibfile, but doesn't immediately save it. The Objective-C objects that represent the new application's interface appear in a new project window, called "Untitled":

The project window

The intial window and menubar also appear on the screen. The new application's name appears in the menus as "NewApplication". Save the new nibfile into the "currency-converter" folder that you created earlier (on this page). Give the new file the name "CurrencyConverter.nib"

NOTE: Most Objective-C application projects use a main nibfile called "MainMenu.nib", and if you use XCode to create a new application project, it creates a nibfile with that name. Apple's Currency Converter tutorial assumes that the name of the main nibfile is "MainMenu.nib".

So, why do we tell you to use a different name? Clozure CL has a main nibfile built into it, whose name is "MainMenu.nib". Normally you don't see it, and don't even need to know that it exists. But the Clozure CL application-building tools create a new application by copying resources from the Clozure CL application, so that your new application has available to it all the built-in Clozure CL tools. We ask you to name your nibfile "CurrencyConverter.nib" so that it can coexist with the Clozure CL main nibfile without causing any problems.

This difference between a Lisp project and an Objective-C project might be a little confusing at first. Just try to keep in mind that whenever Apple's tutorial refers to the "MainMenu.nib" file, it means the file we have just created and named "CurrencyConverter.nib". In a Clozure CL project, "MainMenu.nib" is the name of the IDE's main nibfile, not your application's main nibfile.

Start Previous

Attachments (7)

Download all attachments as: .zip