• 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: Frontmost window
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Frontmost window


  • Subject: Re: Frontmost window
  • From: John Stiles <email@hidden>
  • Date: Fri, 16 Nov 2007 17:16:05 -0800

It looks like that lists /all/ windows, not just /my /windows.

They have a "NSWindowListForContext" but the docs discourage its use because it may be removed in a future release. They also don't explain how to get a context number for my own app (though I could probably figure that out if the API weren't deprecated).


j o a r wrote:

On Nov 16, 2007, at 4:50 PM, John Stiles wrote:

I'm trying to determine which window in my app is frontmost.
It might not necessarily be key if my app isn't in the foreground.
I found a technique that works, but is there a simpler API that I'm missing?


You can use the AppKit function "NSWindowList" for this purpose. Note that it only includes onscreen windows, so miniaturized windows will, as an example, be excluded.

Cheers,

j o a r


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Frontmost window (From: John Stiles <email@hidden>)
 >Re: Frontmost window (From: j o a r <email@hidden>)

  • Prev by Date: Re: Frontmost window
  • Next by Date: Re: Best way to save a simple text file?
  • Previous by thread: Re: Frontmost window
  • Next by thread: Leopard 10.5.1 And redraws
  • Index(es):
    • Date
    • Thread