Re: Non-activating panel not working
Re: Non-activating panel not working
- Subject: Re: Non-activating panel not working
- From: Ted Lowery <email@hidden>
- Date: Fri, 10 Jan 2003 22:13:20 -0500
- Resent-date: Fri, 10 Jan 2003 22:20:00 -0500
- Resent-from: Ted Lowery <email@hidden>
- Resent-message-id: <email@hidden>
- Resent-to: email@hidden
Update:
I heard from a couple of folks that they experienced the same behavior,
so I assume it is a bug in IB.
A little investigation showed that my non-activating panel was
receiving a [windowDidBecomeKey] message, and my document window was
receiving a [windowDidResignKey] message, however, visually, it seemed
the document window was still key and main.
Here's my fix:
Added an NSWindow* variable to my NSApplication subclass, with accessor
methods.
Whenever a document window receives a [windowDidBecomeKey] message, I
set that NSApp variable to be the document window.
Whenever my panel window receives a [windowDidBecomeKey] message, I
immediately reset the key window to be the most recent doc window.
This seems to work just like I want, with no unwanted side effects.
Anybody think of a reason I should do this differently?
This fix does have the side effect of making the most recent key
document window become key when the panel was pressed, even if another
(non-document) window was key. For my application, I actually prefer
this behavior.
Cheers, Ted
On Wednesday, January 8, 2003, at 11:21 PM, Ted Lowery wrote:
Hi all-
I have a toolbar panel in my application. I've set the window in IB
to be a Non activating Panel. It shows the small close buttons, and
no min/max buttons as I would expect. When I click the window, it
accepts my click, and doesn't "appear" to become the key or main
window, ie, my document window keeps it appearance as the main window.
However, my document window doesn't accept the first click, there's
no visible change, but I have to click it the second time before it
recognizes the click.
If I unselect the Non activating Panel checkbox, it acts as expected,
and becomes the key window when clicked.
It's as if the appearance of the Non activating panel is working, but
not the behavior.
Does this checkbox work right? Is there something else I have to do?
Thanks, Ted
_______________________________________________
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.