• 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
Re: What's the magic that makes cmd-w close a window?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What's the magic that makes cmd-w close a window?


  • Subject: Re: What's the magic that makes cmd-w close a window?
  • From: j o a r <email@hidden>
  • Date: Tue, 11 Oct 2005 18:54:21 +0200


On 11 okt 2005, at 18.36, Jerry Krinock wrote:

When the user hits cmd-W, the frontmost window should close.

I have done this by making a menu item or button, wiring it to NSWindow's
-performClose action and assigning cmd-W as its keyboard shortcut. But I am
trying to clear this excess clutter from my user interface. Note: I am
particularly interested in non-document windows.


In Apple's TextEdit example, I see that the Preferences window (presumably
NOT a document window) behaves this way, but I can't find anything in its
.nib or code to support it. What's the magic??

See the documentation:

<http://developer.apple.com/documentation/Cocoa/Conceptual/ BasicEventHandling/index.html>

For example "The Path of a Key Event". The key thing to learn is the concept of the "responder chain", and the "first responder".

j o a r


Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >What's the magic that makes cmd-w close a window? (From: Jerry Krinock <email@hidden>)

  • Prev by Date: What's the magic that makes cmd-w close a window?
  • Next by Date: Re: What's the magic that makes cmd-w close a window?
  • Previous by thread: What's the magic that makes cmd-w close a window?
  • Next by thread: Re: What's the magic that makes cmd-w close a window?
  • Index(es):
    • Date
    • Thread