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:
Update their existing programs (Carbon). If programmers were willing to put some effort into getting with the OS X program, they could simply adapt, or update, their existing software.
The resulting software looks and feels almost like a true OS X program—but behind the scenes, the bulk of the computer programming was the same as it was in Mac OS 9. These are what Apple calls Carbonized programs, named for the technology (Carbon) that permits them to run on OS X.
Most Carbonized programs don’t offer all the features available to OS X, however. In the following pages, you’ll discover which OS X goodies you sacrifice when using programs adapted this way.
Write new programs from scratch (Cocoa). As OS X became more popular, more software companies created programs exclusively for it. The geeks call such programs Cocoa applications. Although they look exactly like Carbonized programs, they feel a little bit more smooth and solid. And they offer a number of special features that Carbonized programs don’t offer.
These days, almost every name-brand program is a true Cocoa application, including Photoshop, Microsoft Office, FileMaker, iMovie, Safari, Messages, Photos, TextEdit, Stickies, Mail, Contacts, and so on.
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.
The Mac has always been the designer’s preferred computer, and OS X only strengthens its position. For one thing, OS X comes with over 200 beautiful fonts that Apple licensed from commercial type companies.
When you use a Carbon program, you usually access these fonts the same way as always: using a Font menu. But when you use a Cocoa program, you get the Fonts panel, which makes it far easier to organize, search, and use your font collection. Chapter 13 describes fonts, and the Fonts panel, in more detail.
In general, Cocoa programs automatically sharpen up their text when you view it on a Retina Display—Apple’s name for super-high-resolution screens like the one on its latest MacBook laptops. Text in Carbonized programs, on the other hand, looks blotchy and awful until their software companies make the effort to make them Retina-friendly.
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:
Control-A. Moves your insertion point to the beginning of the paragraph. (Mnemonic: A = beginning of the Alphabet.)
Control-E. Deposits your insertion point at the end of the paragraph. (Mnemonic: E = End.)
Control-D. Forward delete (deletes the letter to the right of the insertion point).
Control-K. Instantly deletes all text from the insertion point to the right end of the line. (Mnemonic: K = Kills the rest of the line.)
Control-O. Inserts a paragraph break, much like Return, but leaves the insertion point where it was, above the break. This is the ideal trick for breaking a paragraph in half when you’ve just thought of a better ending for the first part.
Control-T. Moves the insertion point one letter to the right—and, along with it, drags whichever letter was to its left. (Mnemonic: T = Transpose letters.)
Option-Delete. Deletes the entire word to the left of the insertion point. When you’re typing along in a hurry and discover that you’ve just made a typo, this is the keystroke you want. It’s much faster to nuke the previous word and retype it than to fiddle around with the mouse and the insertion point just to fix one letter.
Four additional keystrokes duplicate the functions of the arrow keys. Still, as long as you’ve got your pinky on the Control key…
Control-B, Control-F. Move the insertion point one character to the left or right, just like the left and right arrow keys. (Mnemonic: Back, Forward.)
Control-N, Control-P. Move the insertion point one row down or up, like the down and up arrow keys. (Mnemonic: Next, Previous.)
The ⌘ key unlocks a slick trick in Cocoa programs: It lets you operate the buttons and controls of an inactive background window without bringing it to the front. You can operate a background window’s resize box, buttons, pop-up menus, and scroll bars, all while another window is in front of it. In fact, you can even drag through text in a background window—and then drag-and-drop it into the foreground window. (Freaky!) In every case, the secret is simply to keep ⌘ pressed as you click or drag.
By holding down certain keys while dragging through text in a Cocoa program, you gain some wild and wacky text-selection powers (especially useful in, for example, TextEdit and Pages):
Highlight only one column out of several by Option-dragging. Instead of highlighting margin to margin, you get only the text within your selection rectangle.
Highlight several passages simultaneously by ⌘-dragging. Each time you ⌘-drag, you highlight another block of text, even though the earlier blocks are still selected (see Figure 5-27).
In most Cocoa programs, you can combine these two tricks. That is, you can select multiple, arbitrary (not full-page-width) blocks of text by pressing both Option and ⌘ as you drag.
Figure 5-27. The beauty of being able to select multiple blobs of text is that you can format all of them simultaneously (making them bold, for example) with one click. You can also copy the selected portions; when you paste them into a different document, you get a tidy excerpt containing only the parts you wanted, all run together.