On Jan 8, 2009, at 09:14 AM, Rainer Brockerhoff wrote:
At 05:55 -0800 08/01/09, cocoa-dev-requ...@lists.apple.com wrote:
From: Jerry Krinock <je...@ieee.org>
References: <63539670901072146w570a8dc1wc13c58b8ecb43...@mail.gmail.com
>
<f9d125f1-0873-4967-893a-20e851278...@codeferous.com>
<63539670901072246j1f659c63q33a73b501233f...@mail.gmail.com>
<63539670901072246u6b783883n69fdf7a44fb0a...@mail.gmail.com>
In-Reply-To: <63539670901072246u6b783883n69fdf7a44fb0a...@mail.gmail.com
>
Date: Thu, 8 Jan 2009 05:39:57 -0800
Message-ID: <406b8377-613f-49d2-a3de-2ba381346...@ieee.org>
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 (Cocoa-dev@lists.apple.com)
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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to arch...@mail-archive.com