• 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: how to get events from a carbon event handler, in a cocoa
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to get events from a carbon event handler, in a cocoa


  • Subject: Re: how to get events from a carbon event handler, in a cocoa
  • From: Ingvar Nedrebo <email@hidden>
  • Date: Thu, 14 Sep 2006 18:21:29 +0100

I'm listening for kEventAppLaunched events and receive them just fine in my Cocoa app.

i.

On Sep 14, 2006, at 16:24, Daniel Jalkut wrote:

I haven't confirmed this, but Carbon Event dispatch in Cocoa is limited by Apple to only those events for which there are no reasonable Cocoa counterparts. For instance, the "front process changed" events are dispatched because NSWorkspace doesn't offer any such facility.

Have you tried using the NSWorkspace "NSWorkspaceDidLaunchApplicationNotification" etc notifications to achieve your goal?

Daniel

On Sep 14, 2006, at 11:07 AM, Clayton John wrote:

OK, I basically want to listen for process activation and termination... watching the live process list essentially, here's how the handler gets installed:


EventTypeSpec eventsToListenFor [2];
eventsToListenFor[0].eventClass = kEventClassApplication;
eventsToListenFor[0].eventKind = kEventAppLaunched;
eventsToListenFor[1].eventClass = kEventClassApplication;
eventsToListenFor[1].eventKind = kEventAppTerminated;
OSStatus functionResult = InstallApplicationEventHandler (launchTerminateCallbackUPP,

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40iriz.net


This email sent to email@hidden



_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >how to get events from a carbon event handler, in a cocoa app. (From: Clayton John <email@hidden>)
 >Re: how to get events from a carbon event handler, in a cocoa app. (From: Daniel Jalkut <email@hidden>)

  • Prev by Date: Re: POSTing into a server from COCOA
  • Next by Date: Re: move application to secondary screen
  • Previous by thread: Re: how to get events from a carbon event handler, in a cocoa app.
  • Next by thread: Re: how to get events from a carbon event handler, in a cocoa app.
  • Index(es):
    • Date
    • Thread