Creating and Sending a GURL AppleEvent
Creating and Sending a GURL AppleEvent
- Subject: Creating and Sending a GURL AppleEvent
- From: Kevin LaCoste <email@hidden>
- Date: Mon, 25 Nov 2002 18:27:40 +0900
Hello.
Does anyone have any sample code that might show how this can be done.
I've come up with the following but PB gives me a link error and I'm not
sure how to fix it. Any ideas? Will this create a proper GURL AppleEvent?
--
char * appSignature = "MOZZ";
char * testAddress = "
http://www.yahoo.com/";
AppleEvent event, reply;
AEDesc target;
err = AECreateDesc( typeApplSignature, appSignature,
sizeof(appSignature), & target );
err = AECreateAppleEvent( 'gurl', 'gurl', & target,
kAutoGenerateReturnID, kAnyTransactionID, &event );
err = AEPutParamPtr( &event, keyDirectObject, typeChar, testAddress,
strlen( testAddress ) );
err = AESend( &event, &reply, kAENoReply, kAENormalPriority,
kAEDefaultTimeout, nil, nil );
--
I know that NSWorkspace can do this but I need to send the AppleEvent
directly because it's going to more than one browser.
Oh yes, the link error just in case anyone knows what's wrong...
/usr/bin/ld:
/Users/klacoste/Projects/Motto/build/intermediates/Motto.build/master.o
illegal reference to symbol: _AESend defined in indirectly referenced
dynamic library
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.
framework/Versions/A/HIToolbox
If I comment out the AESend call it compiles and runs just fine. Strange
stuff. I imagine I'm missing a header import because I haven't added any
new headers or frameworks to the default cocoa project.
Thanks.
_______________________________________________
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.