Re: [IB] - can't assign keyboard shortcut to a menu item
Re: [IB] - can't assign keyboard shortcut to a menu item
- Subject: Re: [IB] - can't assign keyboard shortcut to a menu item
- From: Graham Cox <email@hidden>
- Date: Mon, 3 Aug 2009 21:45:27 +1000
On 03/08/2009, at 9:38 PM, Alexander Bokovikov wrote:
OK, nothing to do here, but notice, that Dad Bill (unlike to Dad
Steve) :) uses another approach - a view, having keyboard focus,
automatically activates its popup menu shortcuts, so it's easy to
work with a view as by mouse, as by keyboard. The main menu, of
course, can contain all shortcuts. And it will be pretty enough for
a simple application interface. Nevertheless, the inability of
having popup menus shortcuts in an application, having a complex UI,
may cause the need of very complex or (sooner) dynamic main menu
creation. Of course, it's not my case.
Another reason, why shortcuts would be useful in popup menu, is just
yet another possibility to show them to user.
You can do this if you want - but you have to do it all yourself,
including matching the keyboard to the menu item and invoking it.
The reason it's not supported by default is that a view might not be
the final target for a contextual menu - the view may have many
objects any of which could be the menu's target - only the click
location can tell you which one, so your code might have to deal with
that possibility also. If the view is the final unambiguous target,
it's easy, but that isn't always the case.
--Graham
_______________________________________________
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