Passing a variable to another class
Passing a variable to another class
- Subject: Passing a variable to another class
- From: Alex Zavatone <email@hidden>
- Date: Sat, 05 Mar 2011 14:26:49 -0600
Hi. I've been successfully able to call a method in another AS cass from within xCode, but I'm running into an odd situation where the parameter passing is failing.
I can't even pass in a hardcoded value to the method in the other class. It's regarded as empty.
Can anyone point me to the proper approach for this?
Code in Main:
tell class "serialNumbers" of current application -- set pSerialInstance to Init() Hi() -- I work end tell
tell class "LayerCommandLine" of current application Hi() -- I work end tell
tell application "Adobe Illustrator" to set myLayerNames to the name of every layer of myDoc as list log "LayerCount " & the (number of items of myLayerNames)
tell class "LayerCommandLine" of current application set myPrefixesAndSuffixes to GetLayerPrefixesAndSuffixes(myLayerNames) end tell
Code in LayerCommandLine:
on Hi() log "Hi from LayerCommandLine" display dialog "Hi from LayerCommandLine" return "Hi" end Hi on GetLayerPrefixesAndSuffixes(myLayerList) display dialog "In GetLayerPrefixesAndSuffixes"
log "in GetLayerPrefixesAndSuffixes"
end GetLayerPrefixesAndSuffixes
Output:
Error *** +[LayerCommandLine GetLayerPrefixesAndSuffixes]: {} doesn’t match the parameters {myLayerList} for GetLayerPrefixesAndSuffixes. (error -1721)
As you can see from the error above, the argument to GetLayerPrefixesAndSuffixes is getting dropped. Does anyone know why?
Thanks, - Alex |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
applescriptobjc-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden