osx - NSTextView's insertText method is deprecated in OS X v10.11. What is the replacement? -


i saw in appkit api reference inserttext method deprecated in os x v10.11. supposed use replacement?

the documentation says

- (void)inserttext:(id)astring 

this method means text typed user enters nstextview. see nsinputmanager class , nstextinput protocol specifications more information. ...

in nstextinput there note:

important

nstextinput protocol slated deprecation. please use nstextinputclient protocol, introduced in os x v10.5, described in nstextinputclient protocol reference.

in nstextinputclient protocol there method

- (void)inserttext:(id)astring   replacementrange:(nsrange)replacementrange 

this seems appropriate replacement


Comments