You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have run into a breaking issue in moving from an implementation I made of IActiveScript to ClearScript.
I have JScript that creates a COM object like this:
var thirdPartyObj = new ActiveXObject("ThirdPartyObj.API");
within the script, I also create an array of strings to pass to a method on this object:
var stringData = [];
stringData.push("String1");
stringData.push("String2");
stringData.push("String3");
In the previous iteration, I had a problem directly calling the third party object's method with this array, like this:
thirdPartyObj.ProcessStrings(stringData)
This gave me an error. To circumvent this, I created a global host object function that simply took the JavaScript array and returned an array of String (string[]).
This worked in the original IActiveScript implementation.
Now, with ClearScript, every time I pass this to the ProcessStrings function, regardless of passing it directly or wrapping the array in the function, I get the error "Error converting argument 1 to type class StringArray".
I have tried a number of engine properties, but none have worked:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have run into a breaking issue in moving from an implementation I made of IActiveScript to ClearScript.
I have JScript that creates a COM object like this:
var thirdPartyObj = new ActiveXObject("ThirdPartyObj.API");
within the script, I also create an array of strings to pass to a method on this object:
In the previous iteration, I had a problem directly calling the third party object's method with this array, like this:
thirdPartyObj.ProcessStrings(stringData)
This gave me an error. To circumvent this, I created a global host object function that simply took the JavaScript array and returned an array of String (string[]).
thirdPartyObj.ProcessStrings(JSArrayToStringArray(stringData))
;This worked in the original IActiveScript implementation.
Now, with ClearScript, every time I pass this to the ProcessStrings function, regardless of passing it directly or wrapping the array in the function, I get the error "Error converting argument 1 to type class StringArray".
I have tried a number of engine properties, but none have worked:
Any insight would be appreciated.
Beta Was this translation helpful? Give feedback.
All reactions