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 (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 arch...@mail-archive.com

Reply via email to