FROM : Brent Gulanowski
DATE : Fri Nov 01 05:42:53 2002
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_removed>
http://inkubator.idevgames.com/
Working together to make great software.
_______________________________________________
cocoa-dev mailing list | <email_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
DATE : Fri Nov 01 05:42:53 2002
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_removed>
http://inkubator.idevgames.com/
Working together to make great software.
_______________________________________________
cocoa-dev mailing list | <email_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
| Related mails | Author | Date |
|---|---|---|
| Steve Gehrman | Nov 1, 04:08 | |
| Brent Gulanowski | Nov 1, 05:42 |






Cocoa mail archive

