• 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
Which NSPanel is in front?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Which NSPanel is in front?


  • Subject: Which NSPanel is in front?
  • From: Tom Harrington <email@hidden>
  • Date: Fri, 14 Oct 2005 16:01:37 -0600

I have an application which will open several NSPanels at once--
essentially inspector windows.

I'd like to have an option to hide all inspectors, and then later to
restore the same inspectors that were previously hidden.

The hiding and showing works fine via NSWindow's -orderOut: and
-orderFront: methods, but the problem I'm having is that I can't get
the z-axis layering to remain the same-- basically because I don't
know which of these NSPanels was in front when they were hidden, or
more generally how the panels are layered relative to each other.  So
the inspectors reappear in an unpredicable layering.

I thought that NSApplication's -orderedWindows might be the key, but
its result doesn't seem to include NSPanels, at least not as I have
them configured.  And the NSPanels are neither key nor main windows,
so I can't ask for that either.

NSWindow's -orderWindow:relativeTo: looks tempting except that I don't
know where to get the order when hiding to save for later use when
re-showing.  And -setLevel: looks like it's not fine-grained enough
(the NSPanels will all have the same "level").

What am I missing?  Is there some way around this?  If it makes any
difference, this is not a document-based application.

--
Tom Harrington
email@hidden
AIM: atomicbird1
 _______________________________________________
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

  • Prev by Date: Re: Responding to Dock Click
  • Next by Date: Window Controllers Not Linking
  • Previous by thread: unknown host cvs.Sourceforge.net
  • Next by thread: Window Controllers Not Linking
  • Index(es):
    • Date
    • Thread