Skip to Content
Mac OS X in a Nutshell
book

Mac OS X in a Nutshell

by Jason McIntosh, Chuck Toporek, Chris Stone
January 2003
Intermediate to advanced
832 pages
32h 40m
English
O'Reilly Media, Inc.
Content preview from Mac OS X in a Nutshell

Interface Builder

Because it is so graphically oriented, Aqua applications adhere to a very passive runtime model. In fact, a typical Mac OS X application spends most of its time running in an idle loop, waiting for some sort of user input, such as a keypress or a mouseclick onto one of its buttons. Through the Interface Builder application, you specify the onscreen controls that your application will have, and tie these into handler methods within your code.

Interface Builder helps you generate .nib files, which are serialized versions of Cocoa application elements. Typically, an application has one .nib file for every window that its interface contains. A very simple text-editing application, for example, might have one such file for its document window (containing the text view where the user actually types), another for the application’s Preferences window, and a third for its About panel. All but the most minimal applications also contain a .nib that holds its menu bar menus (including its application menu and everything to the right of it, as described in Section 1.2).

Through Interface Builder, build these windows by dragging template windows, controls, and views off of palettes, as shown in Figure 15-5. Then establish connections between parts of the window and classes belonging to your application. Normally, you define a special class known as a Window Controller for every window (and therefore every .nib file), and supply it with two types of data: outlets, which are ...

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.
Start your free trial

You might also like

Mac OS X Internals: A Systems Approach

Mac OS X Internals: A Systems Approach

Amit Singh
C++ In a Nutshell

C++ In a Nutshell

Ray Lischner
Linux Shell Scripting Cookbook - Third Edition

Linux Shell Scripting Cookbook - Third Edition

Clif Flynt, Sarath Lakshman, Shantanu Tushar
Optimized C++

Optimized C++

Kurt Guntheroth

Publisher Resources

ISBN: 0596003706Supplemental ContentCatalog PageErrata