How to update tableView content on the fly

Ok, there are many topics of a missed function like

myTableView:reRender()

I have read all threads about it, but I found no solution for my problem. 

I have a simple tableView, which shows strings from a array-like table. row1.text = table[1] and so on.

During the tableView is shown, the content of the table changes and the tableView should follow. Normally I would just call the above (unfortunately not existing) function. So what to do instead? This a really time sensitive task, so destroy and create a new tableView is no option.

You can take a look at this thread: http://forums.coronalabs.com/topic/36881-tableview-how-to-force-re-rendering/

hey,

i tried first to set the text new, but it didn’t work, what means the text didn’t change. I have no idea why. My current - temporary - solution is to delete, and recreate, all rows :

-- eventListener on table (list) updates function MyClass:atUpdate(event)          local tableview = self.tableView local list = self.list     if #list == 0 then         self:hideTableView()     else         tableview:deleteAllRows()                  for i=1,#list,1 do             tableview:insertRow{                 rowHeight=64,                 isCategory=false,             }          end         self:showTableView()      end end  

Works, but not really a fine solution. I think a integrated function could be much more efficient.

We were promised that the reRender would be back so keep asking Corona Labs! The more people ask… :wink:

You can take a look at this thread: http://forums.coronalabs.com/topic/36881-tableview-how-to-force-re-rendering/

hey,

i tried first to set the text new, but it didn’t work, what means the text didn’t change. I have no idea why. My current - temporary - solution is to delete, and recreate, all rows :

-- eventListener on table (list) updates function MyClass:atUpdate(event)          local tableview = self.tableView local list = self.list     if #list == 0 then         self:hideTableView()     else         tableview:deleteAllRows()                  for i=1,#list,1 do             tableview:insertRow{                 rowHeight=64,                 isCategory=false,             }          end         self:showTableView()      end end  

Works, but not really a fine solution. I think a integrated function could be much more efficient.

We were promised that the reRender would be back so keep asking Corona Labs! The more people ask… :wink: