Re: How to detect focus on an NSTextField
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