Which NSPanel is in front?
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