How do I make an About window the front-most window in a Cocoa application with no UI?
Posted
by mipadi
on Stack Overflow
See other posts from Stack Overflow
or by mipadi
Published on 2010-04-24T23:27:10Z
Indexed on
2010/04/24
23:33 UTC
Read the original article
Hit count: 228
cocoa
|objective-c
I'm building a Cocoa application that runs as an item in the status bar. This application has an About window and an item to activate that about window, using the standard Cocoa mechanism for doing so (-[NSApplication orderFrontStandardAboutPanel:]
). Naturally this is all hooked up automagically.
It works great except for one thing: unlike most About windows, it shows up underneath all other windows, rather than on top. I believe this is because the application does not have a UI, so all its windows are automatically beneath other windows. Is there a way I can hook into the NSApplication mechanism for displaying the About window so I can send it to the front? I've poked around in the docs for NSApplication, but there's no way to get a reference to the About window that I can see so that I can make it appear on top.
© Stack Overflow or respective owner