I am NSOpenPanel to select a file or folder from a user\'s machine. But when the user clicks \"open\" the cursor is at the beginning of the path that shows up in the text field
Here's my Swift solution:
self.fileTextField.currentEditor()?.moveToEndOfDocument(nil)