In case anyone that is interested, I've solved this problem. Here's how:
In the -awakeFromNib method, add the following two lines (where
statusItem is an NSStatusItem *):
[statusItem setAction:@selector(statusItemClicked:)];
[statusItem setTarget:self];
and make sure to
Oops. I spoke too soon.
It *seems* to work because I send a URL off to Safari (which becomes
active) and then with Safari active I try clicking on the status bar
item and the search field accepts focus. But if I switch to another
application first, the same problem appears as before. I
I'm having a problem getting a NSSearchField to work properly in an
NSStatusItem a la the Apple Help menu or the Apple Spotlight menu.
Here's what's happening.
I create my custom NSStatusItem / menu / custom view/ search field,
and insert into into the status bar in -awakeFromNib. Setting