Re: Sending a message to super's super (tab keyDown in NSTextView)
Re: Sending a message to super's super (tab keyDown in NSTextView)
- Subject: Re: Sending a message to super's super (tab keyDown in NSTextView)
- From: Jerry Krinock <email@hidden>
- Date: Thu, 21 Aug 2008 06:35:45 -0700
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@hidden)
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:
This email sent to email@hidden