Hi all,
I am calling a jsx code from within my extension to take advantage of the available xpath method in ExtendScript. I can then generate an array from the xpath result and send it back to the extension.
function jsXpath ( xmlString , xpathExpression )
{
var res = XML ( xmlString ).xpath ( xpathExpression ), i = 0, n = res.length(), arr = [];
for ( i = 0 ; i < n ; i++ )
{
arr[ arr.length ] = res[i];
}
return arr;
}
My issue comes when I try to turn this jsx array into an AS3 array. EB then throws an error :
var arr:Array = jsxInterface.jsXpath ( model.programmes.toXMLString() , xPathExpression ) //as Array;
Error #1034: Echec de la contrainte de type : conversion de flash.external::HostObject@2bfffe51 en Array impossible.
if I trace the result without coercion, I can see the expected result. I just can't turn it into a regular AS3 array ![]()
Any ideas ?
TIA Loic
North America
Europe, Middle East and Africa
Asia Pacific