• 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
determining front most document?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

determining front most document?


  • Subject: determining front most document?
  • From: Mark Dawson <email@hidden>
  • Date: Mon, 25 Apr 2005 23:29:56 -0700

When I bring my preferences window forward, it puts my document behind (as expected). However, I want my pref window to access the "current" document, which I guess is defined as the top most window that has a document associated with it. [[NSDocumentController sharedDocumentController] currentDocument] doesn't work because it returns the document associated with the main window, which is my preference window (so returns nil).

I didn't see any way to go through the window list to determine this. It looks like NSApplication has a "-windows" call that returns an array of windows, but it didn't say that it was ordered in any way. I see that I can change a window order (-orderBack, -level, etc) of a particular window, but not how to figure out what window is "below" any particular one…

Thanks!

mark
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: determining front most document?
      • From: mmalcolm crawford <email@hidden>
    • Re: determining front most document?
      • From: Ashley Clark <email@hidden>
    • Re: determining front most document?
      • From: Justin Spahr-Summers <email@hidden>
    • Re: determining front most document?
      • From: Jonathon Mah <email@hidden>
  • Prev by Date: Re: Binding button.enabled to "NSTextField is not empty"
  • Next by Date: Re: Binding button.enabled to "NSTextField is not empty"
  • Previous by thread: Re: Binding button.enabled to "NSTextField is not empty"
  • Next by thread: Re: determining front most document?
  • Index(es):
    • Date
    • Thread