How can I detect an end editing action on a NSTextView, just like on NSTextField ? I can not see it as an action or in its delegate.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can register for notifications, such as
NSTextDidEndEditingNotification.If you want to use the delegate pattern, then you should check the
NSTextDelegateprotocol. Docs here. The method sent on end editing istextDidEndEditing:.NSTextViewis a subclass ofNSText, so it is a good idea to check the docs for that class, too.Example
NSTextViewhas aNSTextViewDelegateproperty you can use to be notified about changes. The delegate methods are mere convenience methods to obtain the “end editing” notification, unlikecontrol:textShouldEndEditingyou may know fromNSTextField, for example.