Skip to content

Instantly share code, notes, and snippets.

@rrichter
Created October 14, 2011 08:10
Show Gist options
  • Save rrichter/1286529 to your computer and use it in GitHub Desktop.
Save rrichter/1286529 to your computer and use it in GitHub Desktop.
var win = Titanium.UI.createWindow();
var table = Titanium.UI.createTableView();
for(var i = 1; i < 200; i +=1 )
{
table.appendRow(Titanium.UI.createTableViewRow({
title:'Row ' + i,
}));
// 1) Uncomment next line to reproduce bug:
if(i % 100 === 0) table.setData([]);
// 2) There has to be some timing issue which is shown here:
// cell animation did not finish
// try to delay appending the next row
/*if(i % 100 === 0){
table.setData([]);
// simple approch to delay the next appendRow
var j = 100000000;
while(j > 0){
j--;
}
}*/
}
win.add(table);
win.open();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment