Re: Delete action from variety of key presses
Re: Delete action from variety of key presses
- Subject: Re: Delete action from variety of key presses
- From: Nathan Vander Wilt <email@hidden>
- Date: Mon, 7 Jul 2008 17:25:08 -0700
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 (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