{ "id": "121023", "key": "AC-2358", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2013-10-14T17:14:24.000+0000", "created": "2013-10-09T23:42:21.000+0000", "labels": [ "TableView", "tableViewRow" ], "versions": [], "issuelinks": [], "assignee": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "updated": "2016-03-08T07:41:23.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "http://developer.appcelerator.com/question/12081/tableview-delete-row-indexing-issues", "attachment": [], "flagged": false, "summary": "TableView delete row indexing issues", "creator": { "name": "farwayer", "key": "farwayer", "displayName": "Far", "active": true, "timeZone": "Europe/Minsk" }, "subtasks": [], "reporter": { "name": "farwayer", "key": "farwayer", "displayName": "Far", "active": true, "timeZone": "Europe/Minsk" }, "environment": null, "comment": { "comments": [ { "id": "274632", "author": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "Hello Far,\n\nCan you please describe this issue more clearly with full test code and test case? That is can test with app.js file. \n\n\nThanks\n", "updateAuthor": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2013-10-10T17:52:22.000+0000", "updated": "2013-10-10T17:52:22.000+0000" }, { "id": "274718", "author": { "name": "farwayer", "key": "farwayer", "displayName": "Far", "active": true, "timeZone": "Europe/Minsk" }, "body": "SDK 3.1.3\r\niOS 7\r\nXCode 5\r\n\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow({top: 20});\r\n\r\nvar data = [{title: 'Apples'}, {title: 'Bananas'}, {title: 'Carrots'}, {title: 'Potatoes'}];\r\nvar table = Ti.UI.createTableView({\r\n\tdata: data,\r\n\teditable: true\r\n});\r\n\r\ntable.addEventListener('click', function(e) {\r\n\tvar index = e.index;\r\n var row = e.row;\r\n \r\n row.hasCheck = !row.hasCheck; \r\n \r\n Ti.API.log('index is ' + index);\r\n});\r\n\r\nwin.add(table);\r\nwin.open();\r\n{code}\r\n\r\n1. Delete any row from 0 to 3 from table by standard iOS table action\r\n2. Click row that was *after* deleted\r\n3. You will get *** Assertion failure in -[UITableView _endCellAnimationsWithContext:], /SourceCache/UIKit_Sim/UIKit-2903.2/UITableView.m:1076\r\nLook like invalid row returned in event. Row index is valid but no chance to get valid row by any TableView function.\r\n\r\ntable.setData(table.getData()) in 'delete' event resolve this issue but it's ugly hack.", "updateAuthor": { "name": "farwayer", "key": "farwayer", "displayName": "Far", "active": true, "timeZone": "Europe/Minsk" }, "created": "2013-10-10T22:47:14.000+0000", "updated": "2013-10-10T22:48:49.000+0000" }, { "id": "274967", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "Hello,\r\n\r\ntested with iOS7, Ti 3.1.3. When you delete the rows, there is no warning nor failure. \r\n\r\nBest,\r\n\r\nMauro ", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2013-10-14T17:14:24.000+0000", "updated": "2013-10-14T17:14:24.000+0000" }, { "id": "275108", "author": { "name": "farwayer", "key": "farwayer", "displayName": "Far", "active": true, "timeZone": "Europe/Minsk" }, "body": "row.hasCheck = !row.hasCheck; not work for any row *after* deleted.\nYou will get assertion if click last row after delete any except last.", "updateAuthor": { "name": "farwayer", "key": "farwayer", "displayName": "Far", "active": true, "timeZone": "Europe/Minsk" }, "created": "2013-10-15T08:58:18.000+0000", "updated": "2013-10-15T08:58:18.000+0000" }, { "id": "275111", "author": { "name": "farwayer", "key": "farwayer", "displayName": "Far", "active": true, "timeZone": "Europe/Minsk" }, "body": "Look like the problem in\n{code:objc|title=TiUITableView.m}\n- (void)tableView:(UITableView *)ourTableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath\n{code}\nfunction.\n\nAfter delete row from section\n{code:objc}\n...\n[[section rows] removeObjectAtIndex:[indexPath row]];\n...\n{code}\nthere is need to fix row index (TiUITableViewRowProxy *row* property) in all rows after deleted.", "updateAuthor": { "name": "farwayer", "key": "farwayer", "displayName": "Far", "active": true, "timeZone": "Europe/Minsk" }, "created": "2013-10-15T09:44:53.000+0000", "updated": "2013-10-15T09:44:53.000+0000" }, { "id": "275146", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "Hello,\n\nI used your testcase, instructions and it's not failing. If you can provide a testcase that reproduces the issue, we can reopen this.\n\nBest,\n\nMauro ", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2013-10-15T16:25:36.000+0000", "updated": "2013-10-15T16:25:36.000+0000" }, { "id": "275153", "author": { "name": "farwayer", "key": "farwayer", "displayName": "Far", "active": true, "timeZone": "Europe/Minsk" }, "body": "Application don't crash but has wrong behavior after delete row.\n\n1. Click last row several time. You will see that *hasCheck* property set properly.\n2. Delete first row.\n3. Click last row. *hasChecked* property will not change and you will get\n*** Assertion failure in -[UITableView _endCellAnimationsWithContext:], /SourceCache/UIKit_Sim/UIKit-2903.2/UITableView.m:1076\nin console.", "updateAuthor": { "name": "farwayer", "key": "farwayer", "displayName": "Far", "active": true, "timeZone": "Europe/Minsk" }, "created": "2013-10-15T17:26:07.000+0000", "updated": "2013-10-15T17:26:07.000+0000" }, { "id": "275158", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "Hello Far,\nyour several times is 'dozens of times per second'? \n\nBest,\n\nMauro", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2013-10-15T17:46:46.000+0000", "updated": "2013-10-15T17:46:46.000+0000" }, { "id": "275172", "author": { "name": "farwayer", "key": "farwayer", "displayName": "Far", "active": true, "timeZone": "Europe/Minsk" }, "body": "It's not necessary. I made the video for this issue https://mega.co.nz/#!Z89zVZLJ!YSjfqgLZHa96oEKycAnG9xoS9mcL4R7cbZa9xyTMJKU", "updateAuthor": { "name": "farwayer", "key": "farwayer", "displayName": "Far", "active": true, "timeZone": "Europe/Minsk" }, "created": "2013-10-15T18:50:51.000+0000", "updated": "2013-10-15T18:50:51.000+0000" }, { "id": "275633", "author": { "name": "farwayer", "key": "farwayer", "displayName": "Far", "active": true, "timeZone": "Europe/Minsk" }, "body": "Watch this video (it's very short - only 14s) and reopen ticket please, so I can forget about this issue before next release, when I say: \"Good work, guys!\".", "updateAuthor": { "name": "farwayer", "key": "farwayer", "displayName": "Far", "active": true, "timeZone": "Europe/Minsk" }, "created": "2013-10-18T13:33:50.000+0000", "updated": "2013-10-18T13:33:50.000+0000" }, { "id": "281094", "author": { "name": "farwayer", "key": "farwayer", "displayName": "Far", "active": true, "timeZone": "Europe/Minsk" }, "body": "Look like fixed in master. Thx.", "updateAuthor": { "name": "farwayer", "key": "farwayer", "displayName": "Far", "active": true, "timeZone": "Europe/Minsk" }, "created": "2013-11-25T07:04:44.000+0000", "updated": "2013-11-25T07:04:44.000+0000" } ], "maxResults": 12, "total": 12, "startAt": 0 } } }