{ "id": "88082", "key": "TIMOB-8058", "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": [], "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2012-03-17T14:25:25.000+0000", "created": "2012-03-16T12:19:23.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "\"qe-mw020912\"" ], "versions": [ { "id": "12593", "name": "Release 2.0.0", "archived": false, "released": true, "releaseDate": "2012-03-30" } ], "issuelinks": [], "assignee": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2014-01-28T23:48:58.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": "11500", "name": "MobileWeb", "description": "Mobile Web (HTML) Platform" } ], "description": "*Note: This issue is similar to TIMOB-8055 which is linked below, except this is explicitly calling deleteRow and the linked issue sets the table data to remove rows*\r\n\r\nSteps to reproduce:\r\n\r\n1. Create a default mobile web project and change the app.js to the following:\r\n{code}\r\n\r\nvar _window = Titanium.UI.createWindow({\r\n\t\t\ttitle : 'test',\r\n\t\t\tbackgroundColor : 'white'\r\n\t\t});\r\n\r\nvar table = Ti.UI.createTableView({\r\n\t\t\ttitle : 'just a test'\r\n\t\t});\r\n\r\n\t\t_window.add(table);\r\n\r\n\t\tvar data = ['goodday', 'goodtime', 'goodboy', 'goodgirl'];\r\n\t\tvar arr = [];\r\n\r\n\t\tfor(var i = 0, max = data.length; i < max; i++) {\r\n\r\n\t\t\tarr[i] = Ti.UI.createTableViewRow({\r\n\t\t\t\ttitle : data[i],\r\n\t\t\t\tname : data[i]\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\ttable.setData(arr);\r\n\t\ttable.allrows = arr;\r\n\r\n\t\tfor(var j = 0, len = table.allrows.length; j < len; j++) {\r\n\t\t\ttable.allrows[j].addEventListener('click', function(e) {\r\n\t\t\t\tvar index = table.getIndexByName(e.rowData.name);\r\n\t\t\t\tTi.API.info(index);\r\n\t\t\t\ttable.deleteRow(index); // This line should work\r\n\t\t\t});\r\n\t\t}\r\n_window.open();\r\n{code}\r\n\r\n2. Run the app\r\n3. Press on the \"goodgirl\" row\r\n\r\nActual result:\r\nThe table view is loaded but the row isn't deleted and an error of \"TypeError: Result of expression 'e.rowData' [undefined] is not an object.\"\r\n\r\nExpected result:\r\nThe table view is loaded and when one clicks a row it is deleted", "attachment": [], "flagged": false, "summary": "MobileWeb: TableView - The method deleteRow of table view produced the error \"TypeError: Result of expression 'e.rowData' [undefined] is not an object.\"", "creator": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Tested with Ti Studio build 2.0.0.201203152033\r\nTi Mob SDK 2.0.0.v20120316074737 hash r5aa535ab\r\nOSX Lion 10.7.3\r\niPad 1 OS 4.3.5, Galaxy Tab 10.1 OS 3.0", "comment": { "comments": [ { "id": "186952", "author": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This is a duplicate of TIMOB-8004", "updateAuthor": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-03-17T14:25:25.000+0000", "updated": "2012-03-17T14:25:25.000+0000" }, { "id": "186953", "author": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "body": "It's also worth noting that TableView.getIndexByName is not a documented method in TableView, which will also throw an error.", "updateAuthor": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-03-17T14:26:29.000+0000", "updated": "2012-03-17T14:26:29.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }