Re: cocoa-dev digest, Vol 1 #710 - 16 msgs
Re: cocoa-dev digest, Vol 1 #710 - 16 msgs
- Subject: Re: cocoa-dev digest, Vol 1 #710 - 16 msgs
- From: Steve Evangelou <email@hidden>
- Date: Fri, 12 Oct 2001 14:36:18 -0700
On Friday, October 12, 2001, at 12:46 PM, Fei Li <email@hidden>
wrote:
Message: 16
Message-ID: <email@hidden>
From: Fei Li <email@hidden>
To: "'email@hidden'" <email@hidden>
Subject: How to send apple event in cocoa application
Date: Fri, 12 Oct 2001 13:38:35 -0600
Hello all,
I hope I can send messages between two applications on the same
computer. I
think I can use apple event as I used in Mac OS9.
I saw there are two class NSAppleEventManager and
NSAppleEventDescriptor in
Foundation kit, but documentation said:"Cocoa doesn't currently
provide a
mechanism for applications to send Apple events. However, Cocoa
applications
have full access to the Carbon APIs for working with Apple events." So
it
seems I can't send event directly with cocoa's API, but how can I
access to
Carbon APIs from cocoa application?
Or maybe there's other better way to send messages between two
application
on same computer?
Thanks for any assistance!
Fei
You can use plain C code in a Cocoa application and you can link with
frameworks in /System/Library/Frameworks. Apple Event Manager functions
such as AESend are part of AE.framework, a subframework of
ApplicationServices.framework (in the aforementioned directory).
In Project Builder, you can use the Add Frameworks... command from the
Projects menu to add a framework to a project.
Steve Evangelou
Apple Technical Publications