Sunday, 14 January 2007

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

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

When you select text in Carbon a licatio , you're able to drag the text by simply clicking the selection and dragging it. In Cocoa a , 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 inco istency, but has frustrated me countle times. Glad that's all cleared up.

Thanks John!

No comments: