{ "id": "84241", "key": "TIMOB-6858", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "12093", "description": "", "name": "Sprint 2012-01", "archived": true, "released": true, "releaseDate": "2012-01-15" }, { "id": "12593", "name": "Release 2.0.0", "archived": false, "released": true, "releaseDate": "2012-03-30" }, { "id": "12677", "description": "Release 1.8 Service Pack 1", "name": "Release 1.8.1", "archived": true, "released": true, "releaseDate": "2012-01-31" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-01-23T16:16:44.000+0000", "created": "2011-12-23T10:11:52.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "module_tableviewrow", "qe-testadded", "regression" ], "versions": [ { "id": "12580", "description": "Dual Runtime 1.8.0", "name": "Release 1.8.0.1", "archived": true, "released": true, "releaseDate": "2011-12-22" } ], "issuelinks": [], "assignee": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2012-02-10T00:11:15.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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "h3.Problem\r\nWhile using deleterow() method in TableView it always delete the first row (does not matter what index number we put).\r\n\r\nh3.Regression - works fine with SDK 1.7.5\r\n\r\nh3.Reproducible Steps\r\n1. Run the above code\r\n2. Press last row named \"goodgirl\"\r\n\r\nh3.Sample Code\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n title : 'xmas'\r\n});\r\n\r\nvar table = Ti.UI.createTableView({\r\n title : 'just a test'\r\n});\r\n\r\nwin.add(table);\r\nwin.open();\r\n\r\nvar data = ['goodday', 'goodtime', 'goodboy', 'goodgirl'];\r\nvar arr = [];\r\n\r\nfor(var i = 0, max = data.length; i < max; i++) {\r\n\r\n arr[i] = Ti.UI.createTableViewRow({\r\n title : data[i],\r\n name : data[i]\r\n });\r\n}\r\n\r\ntable.setData(arr);\r\ntable.allrows = arr;\r\n\r\n\r\nfor(var j = 0, len = table.allrows.length; j < len; j++) {\r\n table.allrows[j].addEventListener('click', function(e) {\r\n var index = table.getIndexByName(e.rowData.name);\r\n Ti.API.info(index);\r\n //alert(table.data[0].rowCount);\r\n table.deleteRow(index);\r\n });\r\n}\r\n\r\n{code}", "attachment": [], "flagged": false, "summary": "Android: deleterow method always delete the first row", "creator": { "name": "kpomaski", "key": "kpomaski", "displayName": "Karol Pomaski", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "kpomaski", "key": "kpomaski", "displayName": "Karol Pomaski", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Simulator Android 2.2, SDK 1.8.0.1", "comment": { "comments": [ { "id": "177338", "author": { "name": "mark.ruys@in2sports.net", "key": "mark.ruys@in2sports.net", "displayName": "Mark Ruys", "active": true, "timeZone": "Europe/Berlin" }, "body": "The problem is also reproducable in the KitchenSink table_view_row_delete.js. It should delete the last row, but deletes the first. Note that tableview.data.length gives 1 instead of 5. This seems another 1.8.0.1 bug to me. Is it counting sections instead of rows?", "updateAuthor": { "name": "mark.ruys@in2sports.net", "key": "mark.ruys@in2sports.net", "displayName": "Mark Ruys", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-12-27T15:53:41.000+0000", "updated": "2011-12-27T15:53:41.000+0000" }, { "id": "177367", "author": { "name": "marcoschierhorn", "key": "marcoschierhorn", "displayName": "Marco Schierhorn", "active": true, "timeZone": "Europe/Berlin" }, "body": "Yep, i can confirm that. Same here. Seems to count the sections", "updateAuthor": { "name": "marcoschierhorn", "key": "marcoschierhorn", "displayName": "Marco Schierhorn", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-12-28T04:08:20.000+0000", "updated": "2011-12-28T04:08:20.000+0000" }, { "id": "177794", "author": { "name": "sumitk", "key": "sumitk", "displayName": "Sumit Kataria", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I confirm this too.", "updateAuthor": { "name": "sumitk", "key": "sumitk", "displayName": "Sumit Kataria", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-01-02T18:24:04.000+0000", "updated": "2012-01-02T18:24:04.000+0000" }, { "id": "177858", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "Pull request ready\r\n\r\nhttps://github.com/appcelerator/titanium_mobile/pull/1115", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-01-03T10:35:47.000+0000", "updated": "2012-01-03T10:35:47.000+0000" }, { "id": "179076", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing bug. Verified fix on:\r\n\r\nSDK build: 1.9.0.v20120111233134\r\nRuntime: V8, Rhino\r\nTitanium Studio, build: 1.0.8.201201111843\r\nDevice: Droid 3 (2.3.4)", "updateAuthor": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-01-12T11:22:01.000+0000", "updated": "2012-01-12T11:22:01.000+0000" }, { "id": "181025", "author": { "name": "blaart", "key": "blaart", "displayName": "Peter Bosch", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Seems to me this works for Android 2.3.3 but not for Android 2.2", "updateAuthor": { "name": "blaart", "key": "blaart", "displayName": "Peter Bosch", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-01-30T02:31:46.000+0000", "updated": "2012-01-30T02:31:46.000+0000" } ], "maxResults": 8, "total": 8, "startAt": 0 } } }