• 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: How to detect focus on an NSTextField
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to detect focus on an NSTextField


  • Subject: Re: How to detect focus on an NSTextField
  • From: Joachim Deelen <email@hidden>
  • Date: Fri, 8 Feb 2008 10:56:34 +0100

Hi Adam,

what about NSWindow firstResponder? This Method returns the Object, that currently handles all Keyboard and Mouse Events at first. On the control itself, there is no Method like "isFirstResponder" (as far as I know). Only the new NSCollectionView has such a method.

 regards
Joachim

Am 08.02.2008 um 08:32 schrieb Adam Gerson:

I have done some exhaustive searching on google to find a way to detect if my NSTextField has focus (if the user has click in it or has typed something in it). The best I could find is:

[urlEntryTextField currentEditor];

Which does not appear to work 100% of the time. I have an editable NSTableView that doesn't want to give up focus under certain conditions when I click out of it and into the NSTextView.

I found alot of convoluted posts. Is there an simple way to detect if a control has current focus?

Thanks,
Adam

_______________________________________________

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

_______________________________________________

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


  • Follow-Ups:
    • Re: How to detect focus on an NSTextField
      • From: Jens Alfke <email@hidden>
References: 
 >How to detect focus on an NSTextField (From: Adam Gerson <email@hidden>)

  • Prev by Date: Rép : Enabled Binding and Array Controllers
  • Next by Date: Re: Catching Cocoa application Crash
  • Previous by thread: How to detect focus on an NSTextField
  • Next by thread: Re: How to detect focus on an NSTextField
  • Index(es):
    • Date
    • Thread