{ "id": "99482", "key": "TIMOB-15692", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "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": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-09-21T13:46:15.000+0000", "created": "2012-08-21T00:46:39.000+0000", "priority": null, "labels": [ "android", "ios", "module_views", "qe-closed-3.2.0", "qe-testadded", "remove", "view" ], "versions": [], "issuelinks": [ { "id": "33148", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "62542", "key": "TIMOB-1910", "fields": { "summary": "Add a removeAllChildren method to views and windows", "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" } }, "priority": { "name": "Trivial", "id": "5" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } }, { "id": "22485", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "104318", "key": "TIDOC-871", "fields": { "summary": "Document newly implemented property removeAllChildren on viewproxy on both iOS and Android. ", "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" } }, "priority": { "name": "Low", "id": "4" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2014-01-23T10:38:25.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" }, { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "It can be very useful to have a safe method to remove all children from a view.\r\ntest case\r\n{code}\r\nvar win = Ti.UI.createWindow({ backgroundColor: '#fff' });\r\nvar scrollView = Ti.UI.createScrollView({height:200,top:0});\r\nwin.add(scrollView);\r\n\r\nvar view1 = Ti.UI.createView({\r\n\tbackgroundColor:'pink',\r\n\tzIndex:10,\r\n\twidth:200,\r\n\theight:30,\r\n\ttop:10,\r\n\tleft:10\r\n});\r\n\r\nvar view2 = Ti.UI.createView({\r\n\tbackgroundColor:'blue',\r\n\tzIndex:11,\r\n\twidth:200,\r\n\theight:30,\r\n\ttop:15,\r\n\tleft:15\r\n});\r\n\r\nvar view3 = Ti.UI.createView({\r\n\tbackgroundColor:'red',\r\n\tzIndex:12,\r\n\twidth:200,\r\n\theight:30,\r\n\ttop:20,\r\n\tleft:20\r\n});\r\n\r\nscrollView.add(view3);\r\nscrollView.add(view2);\r\nscrollView.add(view1);\r\n\r\nvar l = Ti.UI.createLabel({\r\n\ttext:'scroll view: red on top, blue in the middle, pink below',\r\n\tcolor:'#777',\r\n\twidth:300,\r\n\theight:20,\r\n\ttop:50,\r\n\tleft:10,\r\n\tfont:{fontSize:12}\r\n});\r\nscrollView.add(l);\r\n\r\nvar buttonAdd = Ti.UI.createButton({\r\n\ttitle: 'Add',\r\n\ttop: 10,\r\n\twidth: 200,\r\n\theight: 30\r\n});\r\n\r\nbuttonAdd.addEventListener('click', function(){\r\n\tscrollView.add(view3);\r\n\tscrollView.add(view2);\r\n\tscrollView.add(view1);\r\n\tscrollView.add(l);\r\n});\r\nwin.add(buttonAdd);\r\n\r\nvar buttonRemove = Ti.UI.createButton({\r\n\ttitle: 'RemoveAll',\r\n\tbottom: 10,\r\n\twidth: 200,\r\n\theight: 30\r\n});\r\n\r\nbuttonRemove.addEventListener('click', function(){\r\n\tscrollView.removeAllChildren();\r\n});\r\nwin.add(buttonRemove);\r\nwin.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "TiAPI: removeAllChildren method for view", "creator": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "environment": "titanium 2.2.0 (master)\r\nios 5.1\r\nandroid 3.2", "comment": { "comments": [ { "id": "215294", "author": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "body": "pull request\r\nhttps://github.com/appcelerator/titanium_mobile/pull/2788", "updateAuthor": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "created": "2012-08-21T01:20:48.000+0000", "updated": "2012-08-21T01:20:48.000+0000" }, { "id": "217652", "author": { "name": "anagesh", "key": "anagesh", "displayName": "Anirudh Nagesh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Pull request needs to be merged", "updateAuthor": { "name": "anagesh", "key": "anagesh", "displayName": "Anirudh Nagesh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-05T12:18:48.000+0000", "updated": "2012-09-05T12:18:48.000+0000" }, { "id": "220183", "author": { "name": "anagesh", "key": "anagesh", "displayName": "Anirudh Nagesh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR submitted", "updateAuthor": { "name": "anagesh", "key": "anagesh", "displayName": "Anirudh Nagesh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-21T13:46:15.000+0000", "updated": "2012-09-21T13:46:15.000+0000" }, { "id": "225987", "author": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-11-02T17:06:05.000+0000", "updated": "2012-11-02T17:06:05.000+0000" }, { "id": "286749", "author": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "removeAllChildren method working fine...\r\nHence verified and closed.\r\n\r\nAppc-Studio: 3.2.0.201312191455\r\nSdk:3.2.0.GA\r\nacs:1.0.11\r\nalloy:1.3.1-beta\r\nnpm:1.3.2\r\ntitanium:3.2.0\r\ntitanium-code-processor:1.1.0\r\nOsx: Maverick 10.9\r\nXcode: xCode 5.0.2\r\nDevice: HTC Desire(v4.0.3) and iPHONE Simulator(v7.0.3)", "updateAuthor": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-06T10:34:10.000+0000", "updated": "2014-01-06T10:34:10.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }