FROM : Luc Vandal
DATE : Thu Apr 07 18:26:06 2005
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_removed>> 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)
DATE : Thu Apr 07 18:26:06 2005
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_removed>> 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)






Cocoa mail archive

