Re: event/notification for focus?
Re: event/notification for focus?
- Subject: Re: event/notification for focus?
- From: Luc Vandal <email@hidden>
- Date: Thu, 07 Apr 2005 12:26:06 -0400
I don't even understand why it's so difficult to be notified that the
focus has switched to another control... To me it's a pretty basic
thing that should've been included in the API as an event (onFocus) or
a notification (NSFocusChanged). :)
If anyone has a code snippet to share it would really be appreciated!
Luc
On 7-Apr-05, at 11:58 AM, Ricky Sharp wrote:
On Thursday, April 07, 2005, at 10:52AM, Luc Vandal
<email@hidden> wrote:
and how do you check which control has focus? I know that there's
focusView that returns the control that has focus but it doesn't seem
available through [self window];
As I mentioned in a previous message, be careful when finding APIs to
work with 'focus'. focusView is used to determine which view has
"window and coordinate system" focus (see lockFocus).
In order to see if a particular view is the first responder, check out
the recent replies to this thread. I believe someone mentioned that
you should not only check the owning window's firstResponder, but also
if that window is currently key.
--
Rick Sharp
Instant Interactive(tm)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden