Main but not Key window behavior
Main but not Key window behavior
- Subject: Main but not Key window behavior
- From: John Pannell <email@hidden>
- Date: Sat, 6 Nov 2010 12:26:20 -0600
Hi all-
I would like to present a utility panel in my application that becomes the key window, but not the main window. I would like the main window to maintain its active appearance, as is documented in the NSWindow docs, specifically:
http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/WinPanel/Concepts/ChangingMainKeyWindow.html#//apple_ref/doc/uid/20000236-BCIDFJFH
My desired appearance is presented in the docs as the primary reason for the key/main distinction.
It seems like it should be quite easy to accomplish this, but my best efforts have come up short - making the utility panel "key" results in greyed-out close/min/zoom widgets on the "main" window. I've whipped up a demo app to show the effect: my panel is "utility" and "non-activating" in IB, and I launch it with a button to trigger a makeKeyAndOrderFront:.
http://www.positivespinmedia.com/dev/KeyVsMain.zip
I've verified that the windows are in the desired state...
2010-11-06 12:22:21.786 KeyVsMain[10930:a0f] app window is key: NO
2010-11-06 12:22:21.788 KeyVsMain[10930:a0f] app window is main: YES
2010-11-06 12:22:21.789 KeyVsMain[10930:a0f] panel is key: YES
2010-11-06 12:22:21.789 KeyVsMain[10930:a0f] panel is main: NO
I'm on 10.6, could anyone verify that they are seeing the same, or better yet, see what I've done wrong to prevent the desired result?
Any help is appreciated!
John
John Pannell
Positive Spin Media
http://www.positivespinmedia.com_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden