interpretKeyEvents: and insertText: under 10.8
interpretKeyEvents: and insertText: under 10.8
- Subject: interpretKeyEvents: and insertText: under 10.8
- From: Rob McBroom <email@hidden>
- Date: Thu, 27 Sep 2012 15:49:59 -0400
The documentation for `interpretKeyEvents:` says:
The input manager responds to the request by sending insertText: and doCommandBySelector:messages back to the invoker of this method.
What I'm seeing is that when I call `[self interpretKeyEvents:[NSArray arrayWithObject:theEvent]]` from `keyDown:`, it's sending `insertText:` to a different object …but only once. For subsequent keystrokes, the message is sent to the same object.
`interpretKeyEvents:` should *always* send `insertText:` back to the same object it was called on, right? This appears to be the case under 10.7, but not under 10.8.
The documentation for `insertText:` is a little less clear:
The NSResponder implementation simply passes this message to the next responder, or beeps if there is no next responder.
But I've verified that the first time `insertText:` is called, `self` and first responder are not the same object.
So is this a bug, or am I misunderstanding something? Thanks.
--
Rob McBroom
<http://www.skurfer.com/>
_______________________________________________
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