• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Which window will become keyWindow?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Which window will become keyWindow? (From: Steve Gehrman <email@hidden>)

  • Prev by Date: ObjectWare repository -- Re: [ANN] CHColorMapControl
  • Next by Date: Re: A couple of things I would like to know how to do...
  • Previous by thread: Which window will become keyWindow?
  • Next by thread: [Semi-OT] iMac G3 and Panther
  • Index(es):
    • Date
    • Thread