Cover | Table of Contents | Colophon
/Applications
folder.
) at the top left of the screen is
clicked, is always available, even during application and document
modal periods. The Apple menu, shown in Figure 1-13,
is controlled by the operating system, not by any one application or
by the user.
) at the right side of a menu cell is a
submenu indicator
. A key combination containing the
cloverleaf symbol (
) — also
known as the Command
key
— in combination with a character key
and possibly modifier keys (e.g., Shift, Option) is called a
keyboard equivalent
, or key
equivalent, to the mouse. Key equivalents are used in
combination with the Command (Apple, cloverleaf ) key (or keys) at the
bottom of the keyboard. Menu commands that bring up dialogs are
usually followed by three dots (an
/Applications folder in Figure 1-20, Figure 1-21, and Figure 1-22.
/Developer folder (references
are provided at the end of this chapter).
stuff by entering
"stuff" on the keyboard.
stuff folder easily accessible by
dragging its icon from your Finder view pane and dropping it on your
Finder toolbar (widen the Finder window if necessary). Whenever you
need to access the stuff folder, all you need to
do is click its icon in the Finder toolbar.
/System/Library/Sounds folder in the
Finder window by:
System folder, then the
Library folder, and finally the
Sounds folder (you'll probably
have to scroll down to see it)
Sounds folder, as
we'll see next.
/Applications folder. Look for naming, menu
placement, key equivalents, and window-order violations. Use the
references in the next section.
http://developer.apple.com). The advantage of
using the pages on your computer is that they should match whatever
version of Cocoa you are using, whereas the version on the Apple web
site will match Apple's most recent version of
Cocoa. However, we prefer the version on Apple's web
site, as those pages seem easier to use and frequently have more
complete descriptions of Cocoa concepts.
http://developer.apple.com/techpubs/macosx/Cocoa/CocoaTopics.html
http://developer.apple.com/techpubs/macosx/Essentials/AquaHIGuidelines/AppBTerms/index.html
http://developer.apple.com/techpubs/macosx/Essentials/AquaHIGuidelines/AHGIntro/index.html
http://developer.apple.com/techpubs/macosx/Cocoa/TasksAndConcepts/ProgrammingTopics/Misc/UIElementsPage.html
/Developer/Applications folder, but some reside
in the more user-oriented
/Applications/Utilities folder.
We'll discuss the most helpful of these tools in
this chapter.
/Developer/Applications folder, shown in Figure 2-1.
gdb debugger.
We'll discuss gdb and how
it's used at the Unix command line and with PB
toward the end of this chapter. We'll also take a
quick look at the ObjectAlloc, PropertyListEditor, IconComposer, icns
Browser, Console, ProcessViewer, and Terminal applications.
/Developer/Applications folder, shown in Figure 2-1.
gdb debugger.
We'll discuss gdb and how
it's used at the Unix command line and with PB
toward the end of this chapter. We'll also take a
quick look at the ObjectAlloc, PropertyListEditor, IconComposer, icns
Browser, Console, ProcessViewer, and Terminal applications.
Controller.h) being edited.
We'll discuss all of these PB features in great
detail as we build applications throughout this book.
We'll show you how to open a project in PB and also
how to use the /Developer/Applications, there are several
useful developer tools in the
/Applications/Utilities folder. These
applications are bundled with the user system, but they can still
help developers. The /Application/Utilities
folder is shown in Figure 2-7. The icons in this
folder are rather plain (look at your screen, not the screen shot in
the book), indicating their utility status (compare them with the
more colorful icons for the "fancy"
applications in the /Developer/Applications
folder).
top and ps, which
can be run in a Terminal window in Mac OS X. A screen shot of the
user processes for the logged-in user (as opposed to the
administrator processes) is shown in Figure 2-8.
gdb
. It was written and is maintained by
the Free Software Foundation. gdb is a powerful
tool for looking inside a running program and trying to figure out
why that program is not behaving as expected. Apple has modified
gdb to be aware of Objective-C syntax and
objects, and to work together with the PB and Terminal applications.
gdb tool is located in the directory
/usr/bin. If you
click the Computer icon in the Finder's toolbar and
then select Macintosh HD, you will not see /usr
listed.
Mac
OS X and the Finder hide many system details from the user, including
Unix system directories such as /usr/bin,
/bin, and /etc. You can
view these directories in the Finder using the Go to Folder sheet,
but you cannot see all directories in the Finder (e.g., the
.app directories are hidden). You can, however,
see all the filesystem directories in a Terminal shell — your
vehicle for exploring the guts of Mac OS X.
gdb debugger is in
PB. We'll show you how to get started with that in
this section. First, we must have an application to work with, so
we'll use a copy of the CircleView example
application that is bundled with the Mac OS X developer system.
gdb commands graphically. You
can set breakpoints by clicking the mouse next to a line of code (a
breakpoint is a place where a running program
stops executing and control is returned to the debugger). When a
breakpoint is reached in a running program, the stack frame and the
variables on the stack will be displayed in the debugger window. You
can also use the buttons on the upper-right side of the PB window to
control execution. The up and down arrows will step you up and down
the call stack. The arrow over the parenthesis will execute a
gdb step command. The pause button will pause
execution, and the button with the triangle will continue program
execution.
/Developer/Applications, where most of the tools
are located, we looked at PB, IB, ObjectAlloc, PropertyListEditor,
IconComposer, and the icns Browser. There are other useful tools in
that folder that we did not cover — launch them and find out what
they do. In /Applications/Utilities, we looked
at Terminal, Console, and ProcessViewer. We spent the most time with
the gdb debugger, because it's
an essential developer tool. We also worked with the filesystem and
took a quick look at user interface design.
/Developer/Examples/AppKit/TextEdit
folder into your Home folder and build and run
it — it's the same TextEdit application that we
used in the last chapter. Explore the files associated with the
TextEdit project in PB and IconComposer.