Hi Jon,
Here’s what I’ve found. Using windows simulator.
Having hideScrollBar = true, causes this error all the time.
If I have hideScrollBar = false, I can then only delete the row using a timer delay of 1.
The reason I need the hideScrollBar = true is because the scrollBar does not update if you add a new row to the table, which I’ve sent a bug report about last week.
I’m really stuck with this.
Here’s some sample code:
[lua]
local widget = require( “widget” )
local function onRowRender(event)
local row = event.row
local rowind = row.index
local rownum = display.newText(row,"Row: "…rowind,20,20,native.systemFont,12)
rownum:setTextColor(0)
end
– Create a tableView
local tableView = widget.newTableView
{
left = 0,
top = 0,
width = 320,
height = 480,
listener = tableViewListener,
onRowRender = onRowRender,
hideScrollBar = true,
}
– Create 100 rows
for i = 1, 100 do
local isCategory = false
local rowHeight = 40
local rowColor =
{
default = { 255, 255, 255 },
over = { 255, 0, 255 },
}
local lineColor = { 220, 220, 220 }
– Insert the row into the tableView
tableView:insertRow
{
isCategory = isCategory,
rowHeight = rowHeight,
rowColor = rowColor,
lineColor = lineColor,
}
end
– Delete the tenth row in the tableView
–local function deletetherow()
tableView:deleteRow( 10 )
–end
–timer.performWithDelay(1, deletetherow ,1)
[/lua]