Re: find standard about panel


Jon Gotow
 

Well, its class is NSPanel rather than NSWindow - is it sufficient to just hide / show all NSPanels in the app's window list when you're deactivated / activated?

Alternately, you can look at all NSPanels and see if any have an NSTextField subview that has a string value equal to the localized name of your app (which you can just grab from NSApp.accessibilityLabel if you don't want to screw around with NSBundle). That's almost certain to be the About box unless you're putting your app's name in a text control in one of your windows :-) Not pretty, but it'd work without too much overhead.

- Jon

On 14 Mar 2019, at 8:41 am, James Walker <list2@...> wrote:

How can I find the window produced by -[NSApplication
orderFrontStandardAboutPanel:]? (I’d like to hide the window when my app deactivates.) I know it’s somewhere in the array -[NSApplication windows], but I don’t know how to identify which one.

Join cocoa@apple-dev.groups.io to automatically receive all group messages.