I have a custom view with several NSTextField
controls for which I want to supply custom auto-completions and I have successfully implemented all that using the NSTextFieldDelegate
Protocol. The auto-completions are full names or place names, depending on which text field is being edited.
The issue is that the auto-completions almost always contain a space character and so if the user is typing something that matches a suggestion, but doesn't want to accept that suggestion, the field editor will accept the suggestion when user presses the space key. I want the field editor to accept the suggestion using the tab key only.
I understand that this will involve subclassing NSTextView
to provide a custom field editor, and this is documented by Apple as being the acceptable way, however it's not clear to me what methods I need to override and what the overridden methods need to do, in order to get me what I want.
Can anyone suggest how this is achieved?