Re: AEDesc and NSAppleEventDescriptor
Re: AEDesc and NSAppleEventDescriptor
- Subject: Re: AEDesc and NSAppleEventDescriptor
- From: has <email@hidden>
- Date: Mon, 29 Oct 2007 20:29:42 +0000
ss2cire wrote
:
I'm trying to make a contextual menu module
[...]
my main problem here though is once i get back to the
MyPlugintExamineContext() I can't really figure out how to put
the built NSAppleEventDescriptor into outCommandPairs, my NSLog below
prints something to the effect
"No valid AEDesc"
One thing that immediately jumps out is the following:
AEPutParamDesc(
outCommandPairs, // the list we're putting our command into
0, // stick this command onto the end of our list
[[[commandPairs coerceToDescriptorType:typeAEList] data]
bytes] ); // the command I'm putting into the list*/
AEPutParamDesc requires an AEDesc for its third argument but you're
passing it the AEDesc's data handle. Use the following instead:
[[commandPairs coerceToDescriptorType:typeAEList] aeDesc]
There may be other issues as well, but I'm not familiar with CMM
programming so will defer to others with more experience there.
HTH
has
--
http://appscript.sourceforge.net
http://rb-appscript.rubyforge.org
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden