I have a subclassed NSView that I would like to contain an editable NSTextField, similar to Spotlight.
I am having significant difficult getting the text field to select and highlight. If I click quickly and rapidly over the editing area of the textfield, I can actually enter text, but it appears greyed out, as though I am adding text to a field of an app that is not foremost.
I have tried to get focus of the View's window using viewDidMoveToWindow
, but apparently NSMenuItem's windows are carbon windows that don't handle keys very well.
Long story short, what is a good way to go about making this work successfully? I know that Spotlight is a borderless window, but that is not suitable for my purposes.
Any and all suggestions would be very helpful.