Hi!

I love how the buttons in some "save before closing" sheets reveal themselves by being added to the button name when the command key is held for a while. The one example I can think of is AppleWorks 6. Wish all apps / buttons had that.

Is this a Carbon thing?

How would I go about to implement this?
Seeing that the button in question is not in the responder chain, I guess the implementation ought to be moved to the window or window controller. This doesn't strike me as the best place. I'd rather have a reusable NSButton subclass.

Such buttons also may have multiple shortcuts. E.g. the default save button is triggered by both Enter and cmd-S. This does not seem to be possible with NSButton. Again I wonder if I should override keyDown: in my window controller.

BTW, how are keyboard shortcuts on NSButtons implemented? Do they somehow register with the window for events or does the window walk the subcomponents to find one which may respond?

Best,
Pierre

---
Pierre Bernard
http://www.bernard-web.com/pierre
http://www.houdah.com



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

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to