By overriding -keyDown: and not calling [super keyDown:keyEvent], you have stopped your view from actually processing the keys any further. That's why you aren't getting to either of the delete methods.

Hmm, the flowchart I mentioned (http://developer.apple.com/documentation/Cocoa/Conceptual/EventOverview/EventArchitecture/chapter_2_section_3.html ) gave me the impression that the Cocoa Text System would kick in before the view even had a chance at the event. I did try passing it to super (which in my case is NSView), but still didn't get the text binding actions to fire.

The more I think about it though, it wouldn't make sense for Cocoa Text Bindings to always get first refusal of a key event. I think the links Ken Thomases provided, while great references for that system, only are relevant in subclasses of Cocoa's *Text* subclasses, where Apple has provided a subclass of NSView that loads the key mappings and does the action dispatch itself.

Without the key view being one of Cocoa's text views, would I ever get these actions? Is there a similar built-in mechanism for application- or document-wide bindings unrelated to text editing? If not, then is the only way to turn a key event into an action by doing it myself in an NSResponder subclass put (or picked from) somewhere in the chain?

thanks,
-natevw
_______________________________________________

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