Christoph Basedau
2005-11-30 17:11:13 UTC
Hi
if i have a JScript-Array, is there a way to convert it into
VBArray-Object?
As far as i can see, the VBArray()-constructor mandatorily needs
an existing safeArray, which cannot be empty or undefined, but there
is no JScript-solution for creating one.
Is there a way to create a 'dummy' VBArray and redim it and
copy JSArray-items one by one into it, kind of
//dummycode
var jsArr = [1,2,3,4,5,6,7,8,9];
var vbArr = new VBArray(emptySA);
vaArr.redim (jsArr.length-1);
for (var i=0; i<jsArr.length; i++)
vbArr[i] = jsArr[i];
I know that this won't work, because there is no redim-method
and also no direct assignment to a VBArray-item, like:
vbArr[i] = jsArr[i];
however this is what i want to achieve.
if i have a JScript-Array, is there a way to convert it into
VBArray-Object?
As far as i can see, the VBArray()-constructor mandatorily needs
an existing safeArray, which cannot be empty or undefined, but there
is no JScript-solution for creating one.
Is there a way to create a 'dummy' VBArray and redim it and
copy JSArray-items one by one into it, kind of
//dummycode
var jsArr = [1,2,3,4,5,6,7,8,9];
var vbArr = new VBArray(emptySA);
vaArr.redim (jsArr.length-1);
for (var i=0; i<jsArr.length; i++)
vbArr[i] = jsArr[i];
I know that this won't work, because there is no redim-method
and also no direct assignment to a VBArray-item, like:
vbArr[i] = jsArr[i];
however this is what i want to achieve.
--
Gruesse, Christoph
Rio Riay Riayo - Gordon Sumner, 1979
Gruesse, Christoph
Rio Riay Riayo - Gordon Sumner, 1979