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 <m...@seriot.ch> 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 (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