FROM : Luc Vandal
DATE : Thu Apr 07 17:50:20 2005
Thanks!
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];
Thanks!
Luc
On 7-Apr-05, at 10:41 AM, Mike Ferris wrote:
> The closest thing out of the box is to listen for NSWindowDidUpdate
> and look for changes to keyWindow and firstResponder of keyWindow
> yourself...
>
> As others mentioned, subclassing either views or windows could also be
> done to add this sort of notification. But I usually find that just
> watching for NSWindowDidUpdate and checking if the focus has changed
> is easier.
>
> Mike Ferris
DATE : Thu Apr 07 17:50:20 2005
Thanks!
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];
Thanks!
Luc
On 7-Apr-05, at 10:41 AM, Mike Ferris wrote:
> The closest thing out of the box is to listen for NSWindowDidUpdate
> and look for changes to keyWindow and firstResponder of keyWindow
> yourself...
>
> As others mentioned, subclassing either views or windows could also be
> done to add this sort of notification. But I usually find that just
> watching for NSWindowDidUpdate and checking if the focus has changed
> is easier.
>
> Mike Ferris






Cocoa mail archive

