A text view should not forward uninvokable commands up the responder chain, the docs say for -[NSTextInputClient doCommandBySelector:]
:
If
aSelector
cannot be invoked, thendoCommandBySelector:
should not pass this message up the responder chain.NSResponder
also implements this method, and it does forward uninvokable commands up the responder chain, but a text view should not. A text view implementing theNSTextInputClient
protocol inherits fromNSView,
which inherits fromNSResponder
, so your implementation of this method will override the one inNSResponder
. It should not call super.
The last sentence does not clarify but only rephrase how things are set up if my text understanding does not fail me.
So there basically just is a prescription: "a text view should not". Period.
But why?
I can fathom a case where you want a text view not react to any/all NSResponder
methods but delegate these up to its view controller, for example. Would this cause trouble? Is this just advice to keep text view behavior consistent across macOS apps?