Keyboard shortcuts for views in toolbar items
Keyboard shortcuts for views in toolbar items
- Subject: Keyboard shortcuts for views in toolbar items
- From: j o a r <email@hidden>
- Date: Tue, 15 Oct 2002 16:56:51 +0200
Hej,
It seems that you cannot get the actions in custom views in toolbar
items to trigger on keyboard shortcut events? I tried something like
this (silly simple pseudo code):
NSToolbarItem *item;
NSButton *button;
[button setAction: @selector(buttonAction:)];
[button setTarget: self];
[button setKeyEquivalent: @"j"];
[button setKeyEquivalentModifierMask: NSCommandKeyMask];
[item setView: button];
...and expected to be able to trigger the button action using the
keyboard shortcut. It doesn't seem to work.
If someone could tell me how to do this, or if it is impossible in the
current implementation of NSToolbar, I would be grateful.
Regards,
j o a r
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.