TableListBox refreshComponentForCell issue when scrolled

Hi Jules,

It seems there is an issue in the TabelListBox related to scrollign and updateVisibleArea
but it looks like the old component given to the refreshComponentForCell si not the right one.

I keep a cache of widgets used in the tree and only update those if necessary

Row &row = mRows[rowNumber];
Row::iterator it = row.find(columnId);
if(it == row.end() || it->second != existingComponentToUpdate || !existingComponentToUpdate)
  existingComponentToUpdate = createComponentForCell(rowNumber,columnId);
  row[columnId] = existingComponentToUpdate; // update cache
return existingComponentToUpdate;

when doing this I got some what looks like repaint issue with item that are drawn instead of another one.
I use a version which date from the 16 november

Any idea ?

Hmm… That doesn’t feel like a good way of doing it to me, I can’t exactly see a flaw, but I’m sure there’s a situation that’ll break it…

Personally, I’d always go for the safe approach of dynamic_casting the component to whatever class it’s supposed to be, and then telling it which row number (or whatever) it should represent.

Will investigate.