How to create a list or variable length array of objects?
Hi,
I'm trying to create a list of objects to be returned from a function, but I can't make it work.
The following function works fine
function xxxxxxx()
{
var ContactRow = Aliases["FullScreenApplication"]["AllContactsGrid"]["AllContactsGridView"]("RowControl", "", 1);
var RowIndex = 1;
var ContactsList = new Array(4);
do
{
ContactsList[RowIndex - 1] = ContactRow["DataContext"]["Row"];
RowIndex++;
if(RowIndex <= Aliases["FullScreenApplication"]["AllContactsGrid"]["wRowCount"])
ContactRow = Aliases["FullScreenApplication"]["AllContactsGrid"]["AllContactsGridView"]("RowControl", "", RowIndex);
else
ContactRow = null;
}
while(ContactRow != null )
return ContactsList;
}
In this example I'm creating an Array of 4 objects.
My question is how to create a List or an ArrayList or an Array of variable length ? Each element of the array is an Object (not a string or any other single value)
Thank you!
Yuri
P.S.
I'm using TC 10.6