{ "id": "62957", "key": "TIMOB-2325", "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": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2017-04-28T20:52:02.000+0000", "created": "2011-04-15T03:16:45.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "core" ], "versions": [ { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" } ], "issuelinks": [ { "id": "14727", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "85343", "key": "TIDOC-133", "fields": { "summary": "APIDoc: add method - document that adding child to widget is not supported", "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": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-05-02T21:32:23.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": "h2. Problem\r\n\r\nDevelopers should be prevented from adding children to widgets, but it is currently possible on iOS.\r\n\r\nAndroid exhibits the correct behavior.\r\n\r\nh2. Test case\r\n\r\n{code:lang=javascript}\r\nvar win1 = Titanium.UI.createWindow({\r\n title:'Window 1',\r\n backgroundColor:'#fff'\r\n});\r\n\r\nvar moreBtn = Titanium.UI.createButton({\r\n bottom:25,\r\n borderRadius:5,\r\n height:40,\r\n width:120\r\n});\r\n\r\nvar buttonLabel = Ti.UI.createLabel({\r\n backgroundColor:'transparent',\r\n text: 'Find Out More',\r\n color: '#000',\r\n textAlign:'center',\r\n width: 'auto',\r\n height:'auto'\r\n});\r\n\r\nmoreBtn.add(buttonLabel);\r\nwin1.add(moreBtn);\r\nwin1.open();\r\n\r\nmoreBtn.addEventListener('click', function(){\r\n Ti.Platform.openURL('http://www.google.com');\r\n});\r\n{code}", "attachment": [], "flagged": false, "summary": "iOS: prevent add child to widget (ie. label added to button)", "creator": { "name": "hal", "key": "hal", "displayName": "hal", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "environment": "* Titanium Mobile 1.5.X CI (6 Nov), 1.4.X\r\n* Ubuntu\r\n", "comment": { "comments": [ { "id": "128169", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Currently, Android does not allow children to be added to random\ncontrols. It adds an extra depth layer to the view hierarchy and\nthe depth can only be 12-14 depending on the OS rev and vendor.

\n

Workaround, put the controls in a view.

{html}", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:16:45.000+0000", "updated": "2011-04-15T03:16:45.000+0000" }, { "id": "128170", "author": { "name": "hal", "key": "hal", "displayName": "hal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Jeff's latest documentation confirms that this ticket is\ninvalid:
\n\"Widgets are simply special types of Views that have special\nfunctionality such as Buttons and Textfields. Underneath the cover\na Widget is a View. However, unlike typical Views, Widgets cannot\nthemselves have children.\"

{html}", "updateAuthor": { "name": "hal", "key": "hal", "displayName": "hal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:16:45.000+0000", "updated": "2011-04-15T03:16:45.000+0000" }, { "id": "128171", "author": { "name": "hal", "key": "hal", "displayName": "hal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

After some thought, this is an inconsistency issue between the\ndocumentation (correct behaviour) and the KS. See \nbutton.js.

\n

Hence, the KS needs to be corrected. Will seek Don's advice on\nhow to proceed.

{html}", "updateAuthor": { "name": "hal", "key": "hal", "displayName": "hal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:16:46.000+0000", "updated": "2011-04-15T03:16:46.000+0000" }, { "id": "180383", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "Raised TIMOB-7350 to correct KS.", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2012-01-24T03:12:16.000+0000", "updated": "2012-01-24T03:12:16.000+0000" }, { "id": "215853", "author": { "name": "jyounus", "key": "jyounus", "displayName": "Junaid Younus", "active": true, "timeZone": "Europe/London" }, "body": "Tested on the iOS simulator using TiSDK 2.2.0v20120821095711, issue still valid. ", "updateAuthor": { "name": "jyounus", "key": "jyounus", "displayName": "Junaid Younus", "active": true, "timeZone": "Europe/London" }, "created": "2012-08-23T11:54:27.000+0000", "updated": "2012-08-23T11:54:27.000+0000" }, { "id": "418289", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as invalid as this version of Kitchen Sink is no longer in use.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-04-28T20:52:02.000+0000", "updated": "2017-04-28T20:52:02.000+0000" }, { "id": "418862", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Resolving ticket as Invalid as there is now a new version of Kitchen Sink available and we no longer support the version which relates to this ticket.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-05-02T21:32:23.000+0000", "updated": "2017-05-02T21:32:23.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }