• 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: Adam Gerson <email@hidden>
  • Date: Fri, 08 Feb 2008 18:19:42 -0500

Kyle Sluder wrote:
On Feb 8, 2008 2:32 AM, Adam Gerson <email@hidden> wrote:
I found alot of convoluted posts. Is there an simple way to detect if a
control has current focus?

I'm interested in what you're trying to accomplish. Is it something visual? Maybe there's a better way to do what you want than determining if a control has the focus.

--Kyle Sluder

Good Question. I have an NsTextField and an NSTableView both of which could contain some information. If the user has highlighted a row in the table I want a button to perform some action on the content of the Table Row. However. if the user has typed text into the TextField more recently I want the button to perform the action on the textfield's data. The problem I have noticed crops up when they have selected a row in the table and then click on the text field, the table row remains highlighted, it just looses focus.



_______________________________________________

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: 
 >How to detect focus on an NSTextField (From: Adam Gerson <email@hidden>)
 >Re: How to detect focus on an NSTextField (From: "Kyle Sluder" <email@hidden>)

  • Prev by Date: Re: My app breaks when moved while running
  • Next by Date: Re: Objective-C++
  • Previous by thread: Re: How to detect focus on an NSTextField
  • Next by thread: Re: How to detect focus on an NSTextField
  • Index(es):
    • Date
    • Thread