Re: App Listener?
Re: App Listener?
- Subject: Re: App Listener?
- From: Ken Thomases <email@hidden>
- Date: Thu, 8 Jan 2009 10:07:21 -0600
On Jan 8, 2009, at 7:39 AM, Jerry Krinock wrote:
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.
For typical apps, you can register for the Carbon event
(kEventClassApplication, kEventAppFrontSwitched) which will let you
know as apps get activated.
However, I doubt the Dashboard is a typical app in this sense. I
haven't tested that assumption, though. Perhaps the Accessibility API
will help, in that case.
Cheers,
Ken
_______________________________________________
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