On Jun 4, 2008, at 3:37 PM, Jerry Krinock wrote:


On 2008 Jun, 04, at 14:53, Corbin Dunn wrote:

http://developer.apple.com/releasenotes/Cocoa/AppKit.html#NSMenu

Disabled key equivalents passed throughPrior to Leopard, key equivalents corresponding to disabled menu items would be ignored. In Leopard, your application now has a chance to handle these. For example, a key equivalent for control-K on a disabled menu item....

Thank you, Corbin. I understand the pass-through now, but I still have an issue:
   "cmd+upArrow" != "upArrow"

When I type cmd-upArrow, and myAction is disabled, the NSOutlineView executes the action (moving the selection up) which I thought was assigned to upArrow.

This seems to be incorrect, unless BOTH keyboard equivalents upArrow ^and^ cmd+upArrow are assigned to NSTable/OutlineView's "moveSelectionUp" action. I'm not sure, because I cannot find any documentation on precisely what are keyboard equivalents in NSTable/ OutlineView. I realize that upArrow is not really a keyboard equivalent, more an over-ride of -keyDown, but the idea is the same.

That's true! Basically, NSTableView doesn't use the key equiv stuff (in other words, -interpretKeyEvents: isn't called, for various reasons), and overrides -keyDown: to do its logic. It doesn't stop doing stuff if cmd is down; in fact, it never has. I've had requests to make cmd-up/down move to the first/last rows, but there are various compatibility reasons why we don't do that (ie: it conflicts with Finder and open/save shortcuts).

It sounds like you think it is incorrect to have NSTableView handle cmd-up/down like plain up/down. Please log a bug for this; I'll consider changing it.

You can work around it by overriding -keyDown: in a nstableview subclass and not calling super if it is cmd + (up/down).

--corbin
_______________________________________________

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