• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: App Listener?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: App Listener?


  • Subject: Re: App Listener?
  • From: Nicolas Seriot <email@hidden>
  • Date: Mon, 12 Jan 2009 23:44:08 +0100

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


  • Follow-Ups:
    • Re: App Listener?
      • From: "Chunk 1978" <email@hidden>
References: 
 >App Listener? (From: "Chunk 1978" <email@hidden>)
 >Re: App Listener? (From: David LeBer <email@hidden>)
 >Fwd: App Listener? (From: "Chunk 1978" <email@hidden>)

  • Prev by Date: Re: Detecting mouseover in an NSActionCell subclass
  • Next by Date: Re: CALayer removeFromSupeLayer crashes
  • Previous by thread: Re: App Listener?
  • Next by thread: Re: App Listener?
  • Index(es):
    • Date
    • Thread