I have a NSTextField where I would like to enter text at the insertion point. I have a code that don't generate errors:
let str = "Abc"
myTextField.insertText(str)
[edit] When, in the field there is 123|45 (the "|" represents the text insertion point), the output should be 123Abc|45.
Unfortunately don't work because it's deprecated. Here is the documentation. What is the replacement?
Please note that this question is for NSTextField not NSTextView, which has a question here: NSTextView's insertText method is deprecated in OS X v10.11. What is the replacement?
insertText
when myTextField already has44
? – Rajamohan S