Re: App Listener?
Re: App Listener?
- Subject: Re: App Listener?
- From: "Chunk 1978" <email@hidden>
- Date: Mon, 12 Jan 2009 18:04:26 -0500
wow... very nice! thanks a lot for this, it works great...
is there something that could be called
(com.apple.HIToolbox.activateMenuTrackingNotification maybe?) that
would send a notification when Dashboard exits?
On Mon, Jan 12, 2009 at 5:44 PM, Nicolas Seriot <email@hidden> wrote:
> Le 8 janv. 09 à 07:46, Chunk 1978 a écrit :
>
>> does this work with Dashboard? it seems that dashboard is a
>> background application that's always open...
>
> It seems that the notification
> com.apple.HIToolbox.cancelMenuTrackingNotification is sent when Dashboard
> appears.
>
> So while it may have side effects or work differently elswhere or tomorrow,
> you may observe it this way:
>
> - (void)awakeFromNib {
> [[NSDistributedNotificationCenter defaultCenter] addObserver:self
> selector:@selector(menuTrackingWasCancelled:)
> name:@"com.apple.HIToolbox.cancelMenuTrackingNotification" object:nil];
> }
>
> - (void)menuTrackingWasCancelled:(NSNotification *)aNotification {
> NSLog(@"Dashboard was activated (or something else happened).");
> }
>
> --
> Nicolas Seriot
> http://seriot.ch
>
>
>
_______________________________________________
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