• 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: Apple Events in Cocoa
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Apple Events in Cocoa


  • Subject: Re: Apple Events in Cocoa
  • From: Mark Piccirelli <email@hidden>
  • Date: Fri, 29 Jun 2001 20:29:58 -0700

John --

-[NSAppleEventManager -dispatchRawAppleEvent:...] does not send Apple Events to other applications. Here's an accurate description:

"Given an event, reply event, and refCon of the sort passed into Apple Event handler functions that can be registered with AEInstallEventHandler(), dispatch the event to a handler that has been registered with -setEventHandler:andSelector:forEventClass:andEventID:.
This method is primarily meant for Cocoa's internal use. It does not send events to other applications!"

Brendan --

Unfortunately, there's no Cocoa API for sending Apple Events to other applications. The Carbon API for this works fine though.

-- Mark

On Thursday, June 21, 2001, at 01:50 AM, cocoa-dev-
email@hidden wrote:

Brendan,

I think the method:

- (OSErr)dispatchRawAppleEvent:(const AppleEvent *)theAppleEvent
withRawReply:(AppleEvent *)theReply handlerRefCon:(UInt32)handlerRefcon

...in the NSAppleEventManager class is what you need, but I haven't had
occasion to *send* any AppleEvents, so I don't know for sure. It's not
documented, unfortunately.

right now, I'm using this class to receive incoming events.

-jcr

On Wednesday, June 20, 2001, at 12:57 PM, Brendan Younger wrote:

I posted this once before but got no answer.
Does anyone know how to create apple events in cocoa for
inter-application communication? I can use NSScriptCommand to create a
command but I can't find any way to specify the receiver. I know it
has -setReceiversSpecifier but I don't know how to make a
NSScriptObjectSpecifier specify another application. Specifically, I
want to do some of the same things the dock does such as bring an app
frontmost, bring a specific window frontmost and get a list of an
application's windows. Please help.

Brendan Younger


  • Prev by Date: Re: Is awakeFromNib REALLY first to run?
  • Next by Date: 2-moded window question
  • Previous by thread: Re: Apple Events in Cocoa
  • Next by thread: How to build a "System Preference" Panel
  • Index(es):
    • Date
    • Thread