I have a subclass of NSView that I would like to contain an editable NSTextField similar to Spotlight.
It is very difficult for me to get a text box for selection and selection. If I quickly and quickly clicked on the edit field of a text field, I can actually enter the text, but it looks gray, as if I are adding text to an application field that is not the main one.
I tried to get the focus of the View window using viewDidMoveToWindow
, but apparently, NSMenuItem are windows with windows that don't handle keys very well.
In short, what is a good way to make this work a success? I know that Spotlight is a borderless window, but it is not suitable for my purposes.
Any suggestions would be very helpful.
source
share