• 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 16:53:45 -0800

To clarify a bit:
NSApp -windows in the docs does not seem to guarantee any ordering at all.
NSApp -orderedWindows seems close, but is documented to exclude some windows from the list, like panels. I'd want to include all regular windows.



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?



NSWindow * windowInFront = [NSApp makeWindowsPerform:@selector(myWindowIsInFront:) inOrder:YES];



@implementation NSWindow (MyAdditions) - (id) myWindowIsInFront:(id)sender { return (id)YES; } @end

_______________________________________________

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
_______________________________________________

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>)

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