{ "id": "108898", "key": "AC-1893", "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": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-04-03T21:05:36.000+0000", "created": "2013-01-30T22:45:35.000+0000", "labels": [ "api" ], "versions": [], "issuelinks": [], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2016-03-08T07:40:48.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": "14545", "name": "Documentation" } ], "description": "*Problem description*\r\nappendRow returns the following error:\r\n\r\n{code}2013-01-28 19:05:59.154 MyApplication[5447:207] *** Assertion failure in -[_UITableViewUpdateSupport _computeRowUpdates], /SourceCache/UIKit_Sim/UIKit-1912.3/UITableViewSupport.m:386{code}\r\n\r\n*Test case*\r\n{code}\r\nvar counter = 0;\r\n\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor : '#FFFFFF'\r\n});\r\n\r\nvar view = Ti.UI.createView({\r\n\ttop : 0,\r\n\tleft : 0,\r\n\twidth : Ti.UI.FILL,\r\n\theight : Ti.UI.FILL,\r\n\tlayout : 'vertical'\r\n});\r\n\r\nvar button = Ti.UI.createButton({\r\n\ttitle : ' Add Row ',\r\n\ttop : 10,\r\n\tright : 10,\r\n\twidth : Ti.UI.SIZE,\r\n\theight : Ti.UI.SIZE\r\n});\r\nbutton.addEventListener('click', function() {\r\n\tvar row;\r\n\r\n\tcounter++;\r\n\ttable.setData([]);\r\n\tfor (var f = 0; f < counter; f++) {\r\n\t\trow = Ti.UI.createTableViewRow({\r\n\t\t\ttitle : 'New Account ' + f,\r\n\t\t\tbackgroundColor : '#FFFFFF'\r\n\t\t});\r\n\r\n\t\t// Apparently this makes the error display in the console (but doesn't cause it).\r\n\t\tconsole.log('error trigger');\r\n\r\n\t\ttable.appendRow(row);\r\n\t}\r\n});\r\nview.add(button);\r\n\r\nvar table = Ti.UI.createTableView({\r\n\ttop : 0,\r\n\tleft : 0,\r\n\twidth : Ti.UI.FILL,\r\n\theight : Ti.UI.FILL\r\n});\r\nview.add(table);\r\n\r\nwin.add(view);\r\nwin.open();\r\n{code}\r\n\r\n*More info*\r\nThe problem and a sample code were posted in Q&A:\r\n\r\nhttp://developer.appcelerator.com/question/147546/error-using-appendrow#comment-156431\r\n\r\nSince there were problems before adding row to an empty table, I think this is a bug.", "attachment": [], "flagged": false, "summary": "iOS: appendRow returns an error", "creator": { "name": "macrojd", "key": "macrojd", "displayName": "John D. Gauchat", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "macrojd", "key": "macrojd", "displayName": "John D. Gauchat", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Titanium 2.1.4\r\niPhone Simulator\r\nMac Mini\r\nSnow Leopard\r\n", "comment": { "comments": [ { "id": "245549", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closed as fixed. John: If you didn't manage to get it working after upgrading to 3.0, let us know.", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-04-03T21:05:36.000+0000", "updated": "2013-04-03T21:05:36.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }