I have a NSTextField with some text \"sometext\". How can I place the cursor between e and t: \"some|text\" programmatically?
You need to set your text field current editor selected range property. Try like this:
textField.currentEditor()?.selectedRange = NSRange(location: 4, length: 0)
You will need to call displayIfNeeded
textField.displayIfNeeded()