• 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
panels, windows, and the 'esc' key
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

panels, windows, and the 'esc' key


  • Subject: panels, windows, and the 'esc' key
  • From: Ron Fleckner <email@hidden>
  • Date: Wed, 21 Feb 2007 13:17:59 +1100

Hi list,

in my non-document based app I have three windows other than the main one: Preferences, Save Settings and Load Settings. I would like them to be able to be closed by the escape key AS WELL AS be included in the app's Window menu when they are open. All three windows are NSWindows, not NSPanels. An NSWindow will appear in the app's Window menu, but not be able to be closed with 'esc'; an NSPanel won't appear in the Window menu, but will close when frontmost by the 'esc' key. I'm greedy and would like both of those things: window (or panel) to appear in the menu when it's open, window (or panel) to close when 'esc' is pressed.

Now, the funny/strange thing is that one of the windows DOES close when I press escape, but the other two don't. All three appear in the Window menu when open. In IB I've looked at every setting and parameter I can see, but I can't spot a difference between the window which is doing what I want and the other two. Each of the three has it's own nib and associated window controller. None of the windows is a subclass.

Does anyone know how to track down what's going on?

The point, or What Am I Trying To Do?:

Nearly every user function/command in my app can be done by using one key only. It makes the app very easy to use one handed and without the mouse, which is a relatively important part of it's design. I know I can subclass NSWindow and override -keyDown:, and I've done that for the main window. If I have to, that'll be the way I go. But the fact that one of the windows does what I'd like already without me being able to work out why is driving me nuts.

Thanks for any insights

Ron Fleckner
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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: panels, windows, and the 'esc' key
      • From: PGM <email@hidden>
  • Prev by Date: Re: class variables
  • Next by Date: Re: Finding "myself" in a plugin architecture
  • Previous by thread: Re: Changing the Color of NSProgressIndicator with CGContextSetBlendMode
  • Next by thread: Re: panels, windows, and the 'esc' key
  • Index(es):
    • Date
    • Thread