• 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
Main but not Key window behavior
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Main but not Key window behavior
      • From: "email@hidden" <email@hidden>
    • Re: Main but not Key window behavior
      • From: Quincey Morris <email@hidden>
  • Prev by Date: Re: CoreData models as structures
  • Next by Date: Over-released NSMenuItem on using "Open Recent" via Help menu search
  • Previous by thread: [iPhone] How to make UITextView show spell suggestions on top rather than under the text
  • Next by thread: Re: Main but not Key window behavior
  • Index(es):
    • Date
    • Thread