Re: App Listener?
Re: App Listener?
- Subject: Re: App Listener?
- From: Jonathan Hendry <email@hidden>
- Date: Thu, 08 Jan 2009 11:10:29 -0500
On Jan 8, 2009, at 09:14 AM, Rainer Brockerhoff wrote:
At 05:55 -0800 08/01/09, email@hidden wrote:
From: Jerry Krinock <email@hidden>
References: <email@hidden
>
<email@hidden>
<email@hidden>
<email@hidden>
In-Reply-To: <email@hidden
>
Date: Thu, 8 Jan 2009 05:39:57 -0800
Message-ID: <email@hidden>
On 2009 Jan, 07, at 22:46, Chunk 1978 wrote:
does this work with Dashboard? it seems that dashboard is a
background application that's always open...
Well, obviously it does not.
You'd need a NSWorkspaceDidActivateApplicationNotification, but it
looks like there is no such thing. You could periodically poll -
[NSWorkspace activeApplication], but I hope someone has a better
idea, because if you do I would not want your process running on my
Mac.
Today, the only solution seems to be to install a Carbon Event
handler for the {kEventClassApplication, kEventAppFrontSwitched}
event.
A hacky idea might be to create an Objective-C Dashboard widget that
reports when it is displayed or updated, if that's possible.
--
Jonathan Hendry
Howard Hughes Medical Institute
Maunsell Lab
Harvard Medical School
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden