Re: Which window will become keyWindow?
Re: Which window will become keyWindow?
- Subject: Re: Which window will become keyWindow?
- From: Brent Gulanowski <email@hidden>
- Date: Thu, 31 Oct 2002 23:42:53 -0500
On Thursday, October 31, 2002, at 10:08 PM, Steve Gehrman wrote:
I need to know which window will become keyWindow when my application
is activated.
I can't just look at the ordered windows and pick the topmost window.
One of my windows stays behind the others, but can still become key.
I'm trying to control my app using DO using another application, that
app sends messages to my app and the app has to act on the keyWindow,
the problem is that when my app is not the active application, there
is no way for me to know which window is key (or would be key if the
app was activated).
Whichever window was key when the application was last active should
remain key while it is inactive. You can always track the current key
window with notifications. From the NSWindow documentation:
NSWindowDidBecomeKeyNotification
Posted whenever the NSWindow becomes the key window.
This notification contains a notification object but no userInfo
dictionary. The notification object is the NSWindow that has become
key.
--
Brent Gulanowski email@hidden
http://inkubator.idevgames.com/
Working together to make great software.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.