{ "id": "92366", "key": "TIMOB-9267", "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": "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": "2017-05-24T21:39:29.000+0000", "created": "2012-05-24T16:16:32.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "api" ], "versions": [ { "id": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" }, { "id": "13272", "description": "Release 2.0.1", "name": "Release 2.0.1", "archived": true, "released": true, "releaseDate": "2012-04-16" }, { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" } ], "issuelinks": [], "assignee": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-05-24T21:39:29.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "TableView rows are not always getting deleted with deleteRow\r\n\r\nh4. Steps to reproduce:\r\nStep 1. run the code below\r\nStep 2. click on either of the \"Parent\" rows several times until only one of the children remains but not both or there are 3 Children under one Parent. This happens occasionally, not every time. (attaching a screenshot).\r\n\r\n{code:js}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor: 'green'\r\n});\r\nwin.open();\r\n\r\nvar container = Ti.UI.createView({backgroundColor: \"white\", layout: \"vertical\"});\r\n\r\nvar layout = [\r\n\r\n\t{\r\n\t\ttitle: \"Parent 1\",\r\n\t\tisparent: true,\r\n\t\topened: false,\r\n\t\tsub: [\r\n\t\t\t{\r\n\t\t\t\ttitle: \"Child 1\"\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: \"Child 2\"\r\n\t\t\t}\r\n\t\t]\r\n\t},\r\n\t{\r\n\t\ttitle: \"Parent 2\",\r\n\t\tisparent: true,\r\n\t\topened: false,\r\n\t\tsub: [\r\n\t\t\t{\r\n\t\t\t\ttitle: \"Child 3\"\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: \"Child 4\"\r\n\t\t\t}\r\n\t\t]\r\n\t}\r\n\r\n];\r\nvar tableView = Ti.UI.createTableView({\r\n\t// style:Titanium.UI.iPhone.TableViewStyle.GROUPED,\r\n\ttop: 0,\r\n\theight: Ti.Platform.displayCaps.platformHeight,\r\n\tdata: layout\r\n});\r\n\r\n\r\ntableView.addEventListener(\"click\", function(e) {\r\n\r\n\t//Is this a parent cell?\r\n\tif(e.row.isparent) {\r\n\r\n\t\t//Is it opened?\r\n\t\tif(e.row.opened) {\r\n\t\t\tfor(var i=e.row.sub.length; i > 0; i = i - 1) {\r\n\t\t\t\ttableView.deleteRow(e.index + i);\r\n\t\t\t}\r\n\t\t\te.row.opened = false;\r\n\t\t}\r\n\r\n\t\telse {\r\n\t\t\t//Add teh children.\r\n\t\t\tvar currentIndex = e.index;\r\n\t\t\tfor(var i=0; i < e.row.sub.length; i++) {\r\n\t\t\t\ttableView.insertRowAfter(currentIndex, e.row.sub[i]);\r\n\t\t\t\tcurrentIndex++;\r\n\t\t\t}\r\n\t\t\te.row.opened = true;\r\n\t\t}\r\n\r\n\t}\r\n\r\n});\r\n\r\ncontainer.add(tableView);\r\nwin.add(container);\r\n{code}", "attachment": [ { "id": "27926", "filename": "Screen Shot 2012-05-24 at 4.15.15 PM.png", "author": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-05-24T16:16:32.000+0000", "size": 12508, "mimeType": "image/png" } ], "flagged": false, "summary": "iOS: tableView - row not always getting removed with deleteRow", "creator": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "TiSDK 2.0.1.GA2\r\nTiSDK 2.1.0 (05/22/12 14:44 b8f0d63)\r\niPhone Simulator 5.0", "comment": { "comments": [ { "id": "247245", "author": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Issue reproduces \n\nTested with\n\nTitanium Studio, build: 3.0.1.201212181159\nTitanium SDK version: 3.1.0 \nTitanium SDK version: 3.0.2 \niOS iPhone Simulator: iOS SDK version: 6.", "updateAuthor": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-04-12T06:35:33.000+0000", "updated": "2013-04-12T06:35:33.000+0000" }, { "id": "420381", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing this ticket as the issue cannot be reproduced with the following environment; \r\niPhone 7 (10.2) \r\nMacOS 10.11.6 (15G31) \r\nStudio 4.9.0.201705021158 \r\nTi SDK 6.1.0.v20170519131839 \r\nAppc NPM 4.2.9 \r\nAppc CLI 6.2.1 \r\nTi CLI 5.0.13 \r\nAlloy 1.9.11 \r\nArrow 2.0.0 \r\nXcode 8.2 (8C38) \r\nNode v4.8.2 \r\nJava 1.7.0_80", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-05-24T21:39:29.000+0000", "updated": "2017-05-24T21:39:29.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }