Fwd: App Listener?
Fwd: App Listener?
- Subject: Fwd: App Listener?
- From: "Chunk 1978" <email@hidden>
- Date: Thu, 8 Jan 2009 01:46:55 -0500
does this work with Dashboard? it seems that dashboard is a
background application that's always open...
On Thu, Jan 8, 2009 at 12:58 AM, David LeBer <email@hidden> wrote:
>
> On 8-Jan-09, at 12:46 AM, Chunk 1978 wrote:
>
>> is it possible to set up an NSNotification to listen for launched
>> apps? for example, an running app would do something if Safari is
>> opened, or if Dashboard is activated?
>
> Something like this?
> NSNotificationCenter * center = [[NSWorkspace sharedWorkspace]
> notificationCenter];
> [center addObserver:self selector:@selector(appLaunched:)
> name:NSWorkspaceDidLaunchApplicationNotification object:nil ];
> This should give a notification for every app that is launched.
> Check the notification's userInfo dictionary get the launched app's identity
> ;david
>
> --
> David LeBer
> Codeferous Software
> 'co-def-er-ous' adj. Literally 'code-bearing'
> site: http://codeferous.com
> blog: http://davidleber.net
> profile: http://www.linkedin.com/in/davidleber
> twitter: http://twitter.com/rebeld
> --
> Toronto Area Cocoa / WebObjects developers group:
> http://tacow.org
>
>
>
>
>
_______________________________________________
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