• 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
NSAlert - multiple key equivalents for buttons?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSAlert - multiple key equivalents for buttons?


  • Subject: NSAlert - multiple key equivalents for buttons?
  • From: David Reitter <email@hidden>
  • Date: Wed, 7 Oct 2009 13:58:03 -0400

What is the easiest way to get my customized NSAlert to allow multiple key equivalents for its buttons?

For instance, I'd like to assign not just the default Command-D to "Don't Save", but also another key with which my users are very familiar.

I think it might be possibly to replace the performKeyEquivalent: implementation of the NSButtons in my NSAlert with method_setImplementation, but I'd consider this quite the hack. Also, I'm not entirely sure from the documentation if this is going to work in 10.4 and later, and on 64 bit.

Can I somehow inject a responder to capture the key events while the alert is running? I'm not familiar with this and would appreciate some guidance!

Thanks in advance
- David





_______________________________________________

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: NSAlert - multiple key equivalents for buttons?
      • From: Jens Alfke <email@hidden>
    • Re: NSAlert - multiple key equivalents for buttons?
      • From: Kyle Sluder <email@hidden>
  • Prev by Date: Re: Strange Core Data problem after upgrade
  • Next by Date: Re: NSAlert - multiple key equivalents for buttons?
  • Previous by thread: strange localization issue
  • Next by thread: Re: NSAlert - multiple key equivalents for buttons?
  • Index(es):
    • Date
    • Thread