If you’re using an iOSTableDataSource to populate the iOSTable, then you need to delete the row from the underlying data source, not from the table itself, and then call ReloadData or ReloadDataInSection to refresh the table display. In other words, if you didn’t populate the table with AddRow then you don’t delete rows with RemoveRow instead use RowData, SectionCount and the other iOSTableDataSource interface methods to populate the table.
In a recent app I made I ended up inserting / deleting the wrong rows in the database just because I was holding section and row values for each row.
I would recommend to assign a tag to each row and when the user deletes the row, search for the correct row in a loop using the tag.
It might be a little more CPU intensive but worth the error-proofing.
Yea I’m using tag in which I’m holding complete instance of object class which is related to record in db.
When I get selected row, I just extract tag as object class instance and fire e.g. DeleteRecord() method of it
If that is done well then I’m removing row from table and do other GUI stuff.
Since I already have section id and row id I don’t have to go over all sections and rows to check tag for value and match to it (I think).
I’m planning after I complete and wire up all what I need to switch from assigning instance of class to tag with a just placing Db RecordID in tag property since I think it will reduce memory usage since ID would be a string or integer which takes less memory then class object
For know it’s just testing and to see how everything will come together and see what I can do with Xojo (from limits point of view).
Are you sure that there are issues regarding to it?
Is there any chance that maybe on your end you didn’t do something well or maybe some other events are also triggered in your app and makes this things to happen?
For now I’m just doing delete process using Action button per row (swipe from right to left and when user tap on DELETE button).