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

How to detect focus on an NSTextField


  • Subject: How to detect focus on an NSTextField
  • From: Adam Gerson <email@hidden>
  • Date: Fri, 08 Feb 2008 02:32:42 -0500

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


  • Follow-Ups:
    • Re: How to detect focus on an NSTextField
      • From: Bill Garrison <email@hidden>
    • Re: How to detect focus on an NSTextField
      • From: "Kyle Sluder" <email@hidden>
    • Re: How to detect focus on an NSTextField
      • From: Joachim Deelen <email@hidden>
  • Prev by Date: CARenderer difficulties with rendering 3D transformed layers
  • Next by Date: Encryption Frameworks in Cocoa
  • Previous by thread: Re: CARenderer difficulties with rendering 3D transformed layers
  • Next by thread: Re: How to detect focus on an NSTextField
  • Index(es):
    • Date
    • Thread