Re: Cocoa Event Monitor?
Re: Cocoa Event Monitor?
- Subject: Re: Cocoa Event Monitor?
- From: Michael Ash <email@hidden>
- Date: Sun, 8 Feb 2009 00:04:58 -0500
On Sat, Feb 7, 2009 at 2:04 AM, dave d <email@hidden> wrote:
> Hi all,
>
> I'm attempting to write a Cocoa app which listens for key down and key up events from a specified process. I've checked out Apple's Event Monitor example for Carbon:
>
> http://developer.apple.com/samplecode/EventMonitorTest/index.html
>
> This example has the functionality I want, but I'm wondering if there's a more efficient way to accomplish the same thing in Cocoa.
There is no way to accomplish the same thing in Cocoa at all,
efficient or otherwise.
> Even if there's a Cocoa alternative that performs as well, I'd prefer it, since my app is Cocoa and I'd prefer to keep it pure Cocoa if I can.
This is a pretty pointless goal. Being "pure Cocoa" does not give you
any advantages. Cocoa itself is not "pure Cocoa". It is implemented
under the hood using Carbon, CoreGraphics, and all the rest. Using one
of those frameworks yourself as well incurs no penalties.
Mike
_______________________________________________
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