Hi guys, i’m using 1076 build, and i have a problem when i try to delete a row in a tableview. To know the number of rows of my tableview i’m using “#mytableview._view._rows”.
Every time I insert a new row in my table view, I show the total rows with the above command.
[lua]mytableview:insertRow(…)
print(#mytableview._view._rows) --> 1
mytableview:insertRow(…)
print(#mytableview._view._rows) --> 2
mytableview:insertRow(…)
print(#mytableview._view._rows) --> 3
mytableview:insertRow(…)
print(#mytableview._view._rows) --> 4
mytableview:insertRow(…)
print(#mytableview._view._rows) --> 5[/lua]
However, if I delete a row that is not the last I get the following:
[lua]
mytableview:deleteRow(3)
print(#mytableview._view._rows) --> 5 (wrong value, correct is 4)
mytableview:deleteRow(2)
print(#mytableview._view._rows) --> 5 (wrong value, correct is 3)
[/lua]
If instead of delete row by row, i delete all then it works correctly
[lua]mytableview:deleteAllRows()
print(#mytableview._view._rows) --> 0 ok!!![/lua]
Please, I need your help, I think it has to be a bug of Corona
Thanks in advance