Re: Returning reply AppleEvents - how?
Re: Returning reply AppleEvents - how?
- Subject: Re: Returning reply AppleEvents - how?
- From: Ken Tozier <email@hidden>
- Date: Mon, 21 Jun 2004 02:46:36 -0400
On Jun 21, 2004, at 2:00 AM, Dustin Voss wrote:
>
On 20 Jun, 2004, at 8:52 PM, Ken Tozier wrote:
>
>
> I defined a handler for a custom apple event, put what I want to
>
> return in the reply event, but now what? The documentation shows
>
> handlers to have a void return type and there didn't seem to be any
>
> obvious methods in NSAppleEventManager to do it, so how do you send
>
> the reply event back to the sender?
>
>
Cocoa Scripting handlers have a return value. Return the result there.
>
If, for some reason, you can't do that, then you can call
>
[NSScriptCommand currentCommand] and work with that.
>
I wrote my custom handler like so:
- (void)handleAppleEvent:(NSAppleEventDescriptor *)event
withReplyEvent:(NSAppleEventDescriptor *)replyEvent;
documented here:
"
http://developer.apple.com/documentation/Cocoa/Reference/Foundation/
ObjC_classic/Classes/NSAppleEventManager.html#//apple_ref/doc/uid/
20000475/BCIBGJIH"
I put some NSLogs inside it and it is getting called and doing
everything it's supposed to, I just don't know how to return the
results of what it does.
Will look at [NSScriptCommand currentCommand] again though.
Ken
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.