2

I have an application that lives in the menubar, without a main menu or dock icon. I have a button that triggers [NSApp orderFrontStandardAboutPanel:sender];. When that button is clicked, sometimes, the About panel becomes frontmost. Other times, however, the About panel opens, but behind other running application windows (to be clear, behind windows of OTHER applications, not behind my popover from the menubar). I'm not even sure where to start with debugging this - any suggestions?

Thanks.

rick
  • 1,075
  • 4
  • 20
  • 29

1 Answers1

5
NSApplication *app = [NSApplication sharedApplication];
[app activateIgnoringOtherApps:YES];
[NSApp orderFrontStandardAboutPanel:sender];

Please try the code above.

6 1
  • 1,074
  • 1
  • 10
  • 14
  • so you would recommend not using the built-in orderFrontStandardAboutPanel: method and instead initialize and make active the about window? would i just add this into my method that calls orderFrontStandardAboutPanel:? I am not sure how to implement your suggestion. – rick Jun 15 '12 at 02:35