Re: event/notification for focus?
Re: event/notification for focus?
- Subject: Re: event/notification for focus?
- From: Shawn Erickson <email@hidden>
- Date: Fri, 8 Apr 2005 09:22:35 -0700
On Apr 7, 2005, at 1:02 PM, Luc Vandal wrote:
[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?
You sure [self window] is returning a window reference and not nil?
Also is the window returned the active window (not sure without digging in docs if firstResponder is expected return no nil for deactivated windows, etc.)
What is self here, what class of object?
-Shawn
_______________________________________________
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