• 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: Handling key equivalents in a controller class?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Handling key equivalents in a controller class?


  • Subject: Re: Handling key equivalents in a controller class?
  • From: Jens Alfke <email@hidden>
  • Date: Thu, 17 Jul 2008 11:55:23 -0700


On 17 Jul '08, at 10:45 AM, Andy Lee wrote:

I'd add a (BOOL)handleMyKeyDown: method in a category of NSObject, and override keyDown: in NSApplication to traverse windows, delegates (perhaps including control delegates), and descendant views until something returns YES.

Well, if I'm going to subclass, I'll just subclass NSWindow and handle the event there. I wasn't posting because I didn't know how to do it; rather, because it seems awkward (and atypical of Cocoa) that you have to subclass something to get the event; especially since my window delegate is already in the responder chain. I thought maybe I was overlooking a simpler way to do it by delegation.


—Jens

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

_______________________________________________

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

References: 
 >Handling key equivalents in a controller class? (From: Jens Alfke <email@hidden>)
 >Re: Handling key equivalents in a controller class? (From: Jeff Johnson <email@hidden>)
 >Re: Handling key equivalents in a controller class? (From: "Kyle Sluder" <email@hidden>)
 >Re: Handling key equivalents in a controller class? (From: Andy Lee <email@hidden>)

  • Prev by Date: Re: Inverse Regex Library?
  • Next by Date: Re: Inverse Regex Library?
  • Previous by thread: Re: Handling key equivalents in a controller class?
  • Next by thread: Re: Handling key equivalents in a controller class?
  • Index(es):
    • Date
    • Thread