Re: Recognizing standard about box
Re: Recognizing standard about box
- Subject: Re: Recognizing standard about box
- From: "John C. Randolph" <email@hidden>
- Date: Fri, 28 Jun 2002 11:17:27 -0700
On Friday, June 28, 2002, at 03:30 AM, Bill Cheeseman wrote:
on 02-06-27 10:22 PM, John C. Randolph at email@hidden wrote:
On Thursday, June 27, 2002, at 02:42 PM, Bill Cheeseman wrote:
Is there any way to determine whether an open window is the
standard Cocoa
document-based application about box?
It looks like the only way to do this using public API is to
call [NSApplication orderFrontStandardAboutPanel] and then check
which window is frontmost.
If that doesn't get you what you need, I'd have to say file a
feature request.
Sure, but I want to know whether it's frontmost every time the
user chooses
my app's dock menu, for a menu validation gimmick. I would have
to override
orderFrontStandardAboutPanel: and make a note of the window's
unique number,
or something like that, and this is more trouble than it's
worth. [Ah, I see
that Andy Lee just did that.]
Andy's other suggestion seems a good one: check whether the window's
delegate happens to be NSSystemInfoPanel. Are you able to say
whether an
application's about panel is the only panel that would have the same
delegate? Or, asked more usefully, what other panels that an
application
might use would have NSSystemInfoPanel as a delegate?
Andy's idea was a good one.
As it turns out, NSSystemInfoPanel is a singleton, and while
there's nothing really preventing another window pointing to it
as it's window delegate, this won't happen unless someone's
going out of their way to make it happen.
-jcr
John C. Randolph <email@hidden> (408) 974-8819
Sr. Cocoa Software Engineer,
Apple Worldwide Developer Relations
http://developer.apple.com/cocoa/index.html
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.