rowData = [];
alert(rowData[0]);
gives me [Ti.UI.TableViewRow]
Now how can i remove this element... i have been using rowData.splice(), but i have no idea on what to pass to remove it.
Thanks
In the code you present rowData should be empty, so rowData[0] should be undefined. I suppose something is pushed to rowData in between? Anyway, there are several ways to remove elements from arrays:
rowData.length =
0.Array.splice method. E.g.
removing the first element:
rowData.splice(0,1) (means remove
1 element of rowData starting from
element 0 (the first element).shift method: rowData.shift().slice: rowData = rowData.slice(1)
(means: give me all elements from
rowData starting at the first element and
assign the result to rowData),
or rowData.slice(1,4) (means:
give me all elements from
rowData starting at the first element,
ending at the fourth element, and
assign the result to rowData).
rowData[0].style.display = "none";