• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Sending a message to super's super (tab keyDown in NSTextView)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Sending a message to super's super (tab keyDown in NSTextView) (From: Jerry Krinock <email@hidden>)
 >Re: Sending a message to super's super (tab keyDown in NSTextView) (From: Jon Hess <email@hidden>)

  • Prev by Date: Re: Design Question: Pro & Cons of KVC/KVO
  • Next by Date: Re: Design Question: Pro & Cons of KVC/KVO
  • Previous by thread: Re: Sending a message to super's super (tab keyDown in NSTextView)
  • Next by thread: Re: Sending a message to super's super (tab keyDown in NSTextView)
  • Index(es):
    • Date
    • Thread