Widget 2.0 and row.reRender

Will this be possible again? In my app I have a tableview, and when a row is tapped it brings up a detail view on the right, and changes the row bkg color of the active row and changes the other rows to default color. To do this I was iterating thru the rows in the tableview and setting their rowColor to something and then calling row.reRender. I can do this to change the row color on a touch event but not while iterating thru them.

This works:

 list.\_view.\_rows[row.index].\_rowColor.default = {0,0,0,255}  

This doesn’t:

for i=1,#list.\_view.\_rows do  
list.\_view.\_rows[i].\_rowColor.default = {243,243,243,255}  
end  

Is there a better way of doing this?

This is how I have done it in the past(widgets 1.0):

for i=1,table.maxn(list.content.rows) do list.content.rows[i].rowColor = {243,243,243,255} list.content.rows[i].reRender = true end [import]uid: 58885 topic_id: 36714 reply_id: 336714[/import]

Same thing here, we need the rerender.
My apps are broken with the new widgets because of this (and the id parameter in insertRow not passing anything)… [import]uid: 9158 topic_id: 36714 reply_id: 145142[/import]

Same thing here, we need the rerender.
My apps are broken with the new widgets because of this (and the id parameter in insertRow not passing anything)… [import]uid: 9158 topic_id: 36714 reply_id: 145142[/import]

Same thing here, we need the rerender.
My apps are broken with the new widgets because of this (and the id parameter in insertRow not passing anything)… [import]uid: 9158 topic_id: 36714 reply_id: 145142[/import]

Same thing here, we need the rerender.
My apps are broken with the new widgets because of this (and the id parameter in insertRow not passing anything)… [import]uid: 9158 topic_id: 36714 reply_id: 145142[/import]

Did this get fixed???

Need this feature too.

Help please!

 

Thanks,

Alex

You can use the method I posted here: http://forums.coronalabs.com/topic/32670-rowrerender-how-to-do-with-widgets-20/

For the time being

Did this get fixed???

Need this feature too.

Help please!

 

Thanks,

Alex

You can use the method I posted here: http://forums.coronalabs.com/topic/32670-rowrerender-how-to-do-with-widgets-20/

For the time being

@Danny The code you posted doesn’t work properly with build 1094. I also tried the method outlined by chevol and it works slightly better, but it’s still broken as hell.

Yes, that was a work around. It wont really work properly on the latest dailies.

I am working on tableView performance optimisations and stabilising the tableView widget this week. This needs a proper method adding for re-rendering a row, which will come as soon as i possibly can.

There are people screaming at me from every direction to fix their specific bug, but i have to work on a priority basis and alas am only human :slight_smile:

Looking forward to the fix for this.  :)

@Danny The code you posted doesn’t work properly with build 1094. I also tried the method outlined by chevol and it works slightly better, but it’s still broken as hell.

Yes, that was a work around. It wont really work properly on the latest dailies.

I am working on tableView performance optimisations and stabilising the tableView widget this week. This needs a proper method adding for re-rendering a row, which will come as soon as i possibly can.

There are people screaming at me from every direction to fix their specific bug, but i have to work on a priority basis and alas am only human :slight_smile:

Looking forward to the fix for this.  :)

any update on this - desperate waiting for this fix. It has broken my app :frowning:

I have a “x minutes ago” counter in a tableView and needed to get it updating onscreen, but without reRender working, it never updates (unless I scroll it offscreen and back on of course).

To get it working without reRender I had to do a little tom foolery (half a dozen lines or so, but tom foolery nonetheless). Oh, and kudos for ksan for helping me figure out how to get it done :slight_smile:

First, save off the pointer to the text to later be changed in the row (in onRowRender)

[lua]

    local timestampText = getTS(currMess)   –  get correct timestamp return it as a corona text object

    currentMessages[row.index].TS = timestampText   – Let’s see if we can remove / replace this later… muhahaha

[/lua]

Later, to change it: (in a screenUpdate routine that checks every 30 seconds during an enterFrame event)

[lua]

       – this.messageList is my tableView structure, newTS is my new timestamp text in a row

        this.messageList._view._rows[i]._view:remove(currentMessages[i].TS)   – remove old text

        local newTS = getTS(currentMessages[i])                                               – get new updated text object

        this.messageList._view._rows[i]._view:insert(newTS)                              – insert into row

        currentMessages[i].TS = newTS                                                             – resave pointer for next update

[/lua]

That’s about it. Undocumented, but it works like a champ.

No reRender. No scrollToY, no nothing else.

Edit: ahh shoot, the #@$%@#$$ formatting is messed up, ARGGGGGHHHHH!!!

any update on this - desperate waiting for this fix. It has broken my app :frowning: