Adding a NSScriptObjectSpecifier to an event
Adding a NSScriptObjectSpecifier to an event
- Subject: Adding a NSScriptObjectSpecifier to an event
- From: Olivier Destrebecq <email@hidden>
- Date: Thu, 30 May 2002 16:58:18 -0500
From reading the archives, i figured that to send apple event i needed
to use carbon.
I also found the method to get an AEDesc out of an
NSAppleEventDescriptor.
Now my last problem:
I build my event using AEBuildAppleEvent (i'm ready to switch to the
cocoa service to build the event if needed), and i need to add on object
specifier to it. I already have the object specifier in the form of an
NSScriptObjectSpecifier.
I guess i need to convert this guy to an AEDesc to be able to add it to
my event (using carbon call), but i tried to create the same kind of
function as to convert NSAppleEventDescriptor to an AEDesc, but with no
luck because NSScriptObjectSpecifier does not respond to the message
data.
I looked into the doc for NSAppleEventDescriptor and nowhere does it
give a way to add a NSScriptObjectSpecifier as a parameter to this guy
(except to create a descriptor with an NSdata parameter but as i did not
find a way to get the data out of the specifier...).
please point me to what i missed, because i'm sure there is a way to do
that.
Olivier
this won't work because NSScriptObjectSpecifier does not respond to the
message data:
@implementation NSScriptObjectSpecifier(GetAEDesc)
-(AEDesc)aeDesc
{
AEDesc desc;
OSErr err;
DescType descType = typeObjectSpecifier;
NSData *descData = [self data];
err = AECreateDesc(descType, [descData bytes], [descData length],
&desc);
return desc;
}
@end
I
_______________________________________________
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.