Skip navigation.
 
mlRe: event/notification for focus?
FROM : Luc Vandal
DATE : Thu Apr 07 22:02:57 2005

> Or as Mike outline NSWindowDidUpdate may be the best way to know when

to check if the responder may have changed.

Ok, at least now I know that the first responder can change! ;) Here's
what I did so far:

[center addObserver:self
                        selector:@selector(windowUpdated:)
                                name:NSWindowDidUpdateNotification object:nil];

- (void)windowUpdated:(NSNotification*)notification
{
   NSResponder* resp = [[self window] firstResponder];
   
   if( resp != m_resp )
   {
       m_resp = resp;
   }
}

The only problem is that resp is always null. Where should I get the
firstResponder instead?

Thanks for your help guys!

Luc



On 7-Apr-05, at 2:48 PM, Shawn Erickson wrote:

> Or as Mike outline NSWindowDidUpdate may be the best way to know when
> to check if the responder may have changed.

Related mailsAuthorDate
mlevent/notification for focus? Luc Vandal Apr 6, 20:57
mlRe: event/notification for focus? Ricky Sharp Apr 6, 21:58
mlRe: event/notification for focus? ttempel Apr 7, 00:48
mlRe: event/notification for focus? Luc Vandal Apr 7, 01:58
mlRe: event/notification for focus? Dustin Voss Apr 7, 02:22
mlRe: event/notification for focus? Mike Ferris Apr 7, 16:41
mlRe: event/notification for focus? Luc Vandal Apr 7, 17:50
mlRe: event/notification for focus? Ricky Sharp Apr 7, 17:58
mlRe: event/notification for focus? Luc Vandal Apr 7, 18:26
mlRe: event/notification for focus? j o a r Apr 7, 18:36
mlRe: event/notification for focus? Shawn Erickson Apr 7, 18:41
mlRe: event/notification for focus? Luc Vandal Apr 7, 18:46
mlRe: event/notification for focus? j o a r Apr 7, 18:51
mlRe: event/notification for focus? Luc Vandal Apr 7, 19:07
mlRe: event/notification for focus? Ricky Sharp Apr 7, 19:15
mlRe: event/notification for focus? Shawn Erickson Apr 7, 19:29
mlRe: event/notification for focus? Shawn Erickson Apr 7, 20:48
mlRe: event/notification for focus? Luc Vandal Apr 7, 22:02
mlRe: event/notification for focus? Luc Vandal Apr 8, 18:06
mlRe: event/notification for focus? Shawn Erickson Apr 8, 18:18
mlRe: event/notification for focus? Shawn Erickson Apr 8, 18:22
mlRe: event/notification for focus? Luc Vandal Apr 8, 18:29
mlRe: event/notification for focus? Shawn Erickson Apr 8, 18:43
mlRe: event/notification for focus? Luc Vandal Apr 8, 18:46
mlRe: event/notification for focus? Luc Vandal Apr 8, 19:17
mlRe: event/notification for focus? Shawn Erickson Apr 8, 19:33
mlRe: event/notification for focus? Luc Vandal Apr 8, 21:35
mlRe: event/notification for focus? Shawn Erickson Apr 8, 21:45