I'm registering an Apple Event handler using NSAppleEventManager:
[[NSAppleEventManager sharedAppleEventManager]
setEventHandler:self andSelector:@selector(handleGetURLEvent:withReplyEvent:)
forEventClass:kInternetEventClass andEventID:kAEGetURL];
My handler method will, of course, receive the event and a reply event:
- (void) handleGetURLEvent:(NSAppleEventDescriptor *)event withReplyEvent:(NSAppleEventDescriptor *)replyEvent {
//Open this URL; reply if we can't
}
So, if I need to reply with an error, indicating that I failed in some way to open this URL, how should I use the replyEvent
to do that?