Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

append a row with a custom function

I have a function called addRow(data,i) that runs when my app loads and populates a tableview. all is well. i want to use this same function to append a new row to the table but it's not doing anything.

any ideas? I can see the data returned in the console but nothing is appended.

projTable.addEventListener('click',function(e)
{
  var xhr2 = Titanium.Network.createHTTPClient();
  xhr2.onload = function()
  {
    var d = JSON.parse(this.responseText);
    Ti.API.info(d); // verify data is returned
    data = addRow(d,4);
    projTable.appendRow(data);
  };

xhr2.open('GET','http://get_remote_array.php');
xhr2.send();
});
— asked April 24th 2010 by Kelly Redd
  • appendrow
  • tableview
0 Comments

0 Answers

The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.