Re: [NEWBIE] windowDidBecomeKey ?
Re: [NEWBIE] windowDidBecomeKey ?
- Subject: Re: [NEWBIE] windowDidBecomeKey ?
- From: Ricky Sharp <email@hidden>
- Date: Mon, 8 Aug 2005 18:00:39 -0500
On Aug 8, 2005, at 5:15 PM, Stephane Pinel wrote:
Can't figure out in which situation -windowDidBecomeKey delegate
will fire ? I've implemented it in
my windowController but it seems to not fire. Any link in order to
understand how to do it properly ?
You need to add an observer for NSWindowDidBecomeKeyNotification.
You can add the following code in your controller before your window
is made key (e.g. automatically or by calling makeKeyWindow or
makeKeyAndOrderFront:)
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(windowDidBecomeKey:)
name:NSWindowDidBecomeKeyNotification object:theWindow];
[theWindow makeKeyWindow]; // <-- your windowDidBecomeKey:
method should then be called.
___________________________________________________________
Ricky A. Sharp mailto:email@hidden
Instant Interactive(tm) http://www.instantinteractive.com
_______________________________________________
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