Advertisement

C4 Tip: Drag-and-drop text in Cocoa apps

During The Grube's UI presentation at C4, he pointed to one particular example of "functional inconsistency" in Apple's software: the discrepancy in results when you drag-and-drop text in Carbon apps (TextWrangler, AppleWorks, etc.) vs. Cocoa apps (TextEdit, Safari, etc.).

When you select text in Carbon applications, you're able to drag the text by simply clicking the selection and dragging it. In Cocoa apps, however, you need to click the selected text and hold the mouse button down for a fraction of a second before you're able to drag it. Your cursor changes from the text selector to the pointer. But clicking and immediately dragging results in you re-selecting the text.

The Cocoa differentiation is a result of NeXT designing a way to enable both dragging and re-selecting, which was carried into OS X.

It's a minor inconsistency, but has frustrated me countless times. Glad that's all cleared up.

Thanks John!