Tuesday, June 14, 2005

Whilst at WWDC (1)

While I was at WWDC last week, my friend Lisa and I attempted to port a medium sized chunk of code (Nitrogen - available on Sourceforge) from CodeWarrior to XCode, and then to do some surgery on the code. We found a few bugs in the code - it's always good to run C++ code through a different compiler, and found some XCode oddities along the way.

Here's a couple associated with drag and drop text editing:

1) You can't just select a bunch of text in an XCode window and drag it somewhere. You have to select the text, click somewhere in the selected text, wait, 1, 2, and _then_ start dragging. If you don't wait, it will just start a new selection. I talked to one of the Cocoa text engineers later about that, and he said that this was because people would pick up their selected text and move it just a few characters/lines, when they didn't want to do that.

I think that's an inadequate reason. That's what undo was invented for. If you make a mistake, just undo.

2) Open up the "Find in Project" window. The "Find" text field is probably selected. Try to drag some text to the "Replace" text field. Can't do it. Apparently when a NSEditText item is disabled, it's really, really disabled.

More as I go over my notes.

2 Comments:

At 9:43 PM, Blogger Wevah said...

This comment has been removed by a blog administrator.

 
At 9:44 PM, Blogger Wevah said...

You have to select the text, click somewhere in the selected text, wait, 1, 2, and _then_ start dragging.

FWIW, this is how all Cocoa text fields/text views work.

(Reposted because I screwed up copying the text to quote. D: )

 

Post a Comment

<< Home