Cocoa and Carbon

OS X can run two different kinds of programs, each with different characteristics: Cocoa and Carbon. (What follows is a technical discussion, but it’s loads of fun.)

When Apple invented Mac OS X, it gave the world’s software companies a choice:

Here are some of the advantages Cocoa programs offer. May it clear up any confusion you have about why certain features seem to be present only occasionally.

You may remember from Chapter 1 that the title bar of every Finder window harbors a secret pop-up menu. When you Control-click it (or right-click it, or two-finger click it, or ⌘-click it), you’re shown a little folder ladder that delineates your current position in your folder hierarchy. You may also remember that the tiny icon just to the left of the window’s name is actually a handle you can drag to move a folder into a different window.

In Cocoa programs, you get the same features in document windows, as shown back in Figure 2-6 (Dragging from the Title Bar). By dragging the tiny document icon next to the document’s name, you can perform stunts—like dragging that little icon to the desktop or to the Dock icon of a different program for opening—right from your document’s title bar.

Most Cocoa applications respond to certain keystrokes left over from the NeXT operating system, which was OS X’s ancestor. If you’re a card-carrying member of KIAFTMA (the Keyboard Is Always Faster Than the Mouse Association), you’ll love these additional keyboard navigation strokes:

Four additional keystrokes duplicate the functions of the arrow keys. Still, as long as you’ve got your pinky on the Control key…