Pregunta

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.

¿Fue útil?

Solución

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

Please try the code above.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top