On 2008 Aug, 21, at 2:07, Jon Hess wrote:

You may not know this, but when you edit an NSTextField, you're actually typing into an NSTextView. So NSTextView already has all of the logic to "act like a text field".

Of course I ^knew^ that, Jon. I'd heard the teacher say it. I just didn't ^know^ it because I hadn't done the homework :))

Indeed....

NSText setFieldEditor:
Controls whether the receiver interprets Tab, Shift-Tab, and Return (Enter) as cues to end editing and possibly to change the first responder.

Yet another possibility would be to ovveride insertTab: and insertBackTab: instead of keyDown:, however, I think toggling isFieldEditor is your best bet.

Yes that would have been better too.

From my phone -

at 2:07.

Thank you, Jon.  Twenty-four lines of code, GONE!

_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to