5

My Cocoa App is made by a NSStatusBar with a NSTextField inside and a Main Window.
Please, look the screenshots to get the idea:

enter image description here

I have two problems:

  1. When I open Menubar I am unable to got the focus to SearchField (like Spotlight) and I am unable to select content with something like [textField selectText:self]

  2. Worsts: if my MainWindow is on front it works without problems. If my MainWindow is not on front but is visible I am unable to edit TextField. It is selectable with mouse but not editable. Why this ?

enter image description here

I tried all the hacks found but I was unable to solve the issue.

pierocampanelli
  • 960
  • 5
  • 19

1 Answers1

6

I have also had this problem so I ended up completely recreating NSMenu using a NSWindow. I named it JGMenuWindow and you can find the open source code on GitHub here.

Here's an example of what it can do:

enter image description here

Joshua
  • 15,200
  • 21
  • 100
  • 172