• 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: 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


References: 
 >App Listener? (From: "Chunk 1978" <email@hidden>)
 >Re: App Listener? (From: David LeBer <email@hidden>)
 >Fwd: App Listener? (From: "Chunk 1978" <email@hidden>)
 >Re: App Listener? (From: Jerry Krinock <email@hidden>)

  • Prev by Date: Re: [iPhone] Search control like in App Store
  • Next by Date: Encryption and Security
  • Previous by thread: Re: App Listener?
  • Next by thread: Re: App Listener?
  • Index(es):
    • Date
    • Thread