• 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
Getting mad with simple applescript handling (kAEGetURL)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Getting mad with simple applescript handling (kAEGetURL)


  • Subject: Getting mad with simple applescript handling (kAEGetURL)
  • From: Yann Bizeul <email@hidden>
  • Date: Tue, 17 Jun 2003 16:54:15 +0200

Hi,

I just want to write a little protocol handler, as seen in docs and
ML, Safari send an apple event kAEGetURL to the correct application.
So, I register for this apple event like this :
[[ NSAppleEventManager sharedAppleEventManager ]
setEventHandler: self
andSelector: @selector(getUrl:withReplyEvent:)
forEventClass: kInternetEventClass
andEventID: kAEGetURL ];
And this method gets called as expected :

- (void)getUrl:(NSAppleEventDescriptor *)event withReplyEvent:
(NSAppleEventDescriptor *)replyEvent;
{
NSLog(@"%@",[ event stringValue ]);
}
Without success, stringValue is (null). So I think I'm not trying to
get things the right place, can somebody tell me where to get the URL ?
I see it when doing this :

NSLog(@"string : %@", [[ NSString alloc ] initWithData: [ event
data ] encoding: NSASCIIStringEncoding ]);

But with lot of garbage before, so that's not a good solution :-)

Thanks for your help

--
Yann Bizeul
TYNSOE.ORG - http://www.tynsoe.org/
Site technique consacri ` MacOS X
_______________________________________________
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.

  • Follow-Ups:
    • Re: Getting mad with simple applescript handling (kAEGetURL)
      • From: "M. Uli Kusterer" <email@hidden>
    • Re: Getting mad with simple applescript handling (kAEGetURL)
      • From: Greg Robbins <email@hidden>
  • Prev by Date: RE: Alternative to Interface Builder?
  • Next by Date: Re: [OT]? password protected archiving
  • Previous by thread: Re: handling resources in Cocoa
  • Next by thread: Re: Getting mad with simple applescript handling (kAEGetURL)
  • Index(es):
    • Date
    • Thread