SetLevel: window and drawers
SetLevel: window and drawers
- Subject: SetLevel: window and drawers
- From: Bill Cheeseman <email@hidden>
- Date: Sun, 22 Dec 2002 11:19:19 -0500
I'm having trouble solving the following window flashing problem. All help
appreciated.
I have a window with a checkbox to let the user change it from a global
floating window to a normal window or back again on the fly.
The window has drawers. Unfortunately, they want very much to get in front
of the main window when it changes level.
I've mostly solved the case of making the window a normal window. I use
NSDrawer's private _drawerWindow iVar (tsk, tsk) to set each drawer's level
to that of a normal window before I turn the window itself into a normal
window. If I didn't do that, the drawers would remain floating windows and
become visible in front of the main window.
Is say "mostly solved" because sometimes one of the drawer windows remains a
floating window, as if the setLevel: method simply didn't work. Is this a
known issue? -- I've seen references to setLevel: not always working.
But I can't solve the case going the other way -- making the window a
floating window. The simple setFloatingPanel:YES command works, but it
apparently calls setLevel: on the drawers' drawerWindows afterwards to
change their level to match. As a note in the setLevel: documentation says,
this causes each drawer to appear as the frontmost window in the new level,
which is in front of the just-reordered main window. Then the main window is
apparently ordered front again. Although this leaves me where I want to be,
it causes each drawer to flash briefly after its level is changed and before
the main window is ordered front again.
I wonder why the Cocoa setLevel: method always puts a newly reordered window
in front of all other windows at that level? If there were some way to
momentarily hide a window, I could deal with it.
Is there a strategy to avoid the flash?
--
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com
The AppleScript Sourcebook -
http://www.AppleScriptSourcebook.com
Vermont Recipes -
http://www.stepwise.com/Articles/VermontRecipes
Croquet Club of Vermont -
http://members.valley.net/croquetvermont
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.