{ "id": "154105", "key": "TIMOB-20196", "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": "16997", "name": "Release 5.2.0", "archived": false, "released": true, "releaseDate": "2016-02-23" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2016-01-06T21:21:11.000+0000", "created": "2016-01-04T17:57:25.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "ScrollableView" ], "versions": [ { "id": "17532", "name": "Release 5.1.1", "archived": false, "released": true, "releaseDate": "2015-11-24" } ], "issuelinks": [ { "id": "50217", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "outwardIssue": { "id": "153566", "key": "TIMOB-20087", "fields": { "summary": "5.1.X breaks ability to bind one collection to different views / reset collection", "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": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "50222", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "154131", "key": "TIMOB-20199", "fields": { "summary": "iOS: Views disappear from ScrollableView on change", "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": "Medium", "id": "3" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "50233", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "153620", "key": "TIMOB-20138", "fields": { "summary": "Consecutive calls to ScrollableView.setViews causes the app to become unresponsive", "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": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "apetkov", "key": "apetkov", "displayName": "Angel Petkov", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2016-01-13T22:54:39.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": "In a widget I have a ScrollableView where I need to change views. It stopped to work from version 5.1.0.\r\nWhen I set the \"views\" property with another collection of views the app remains blocked, without any error.\r\nI tryed other solution (like insertAt or replaceAt) but I cannot dynamically change views anymore.\r\n\r\nThe widget is this one:\r\nhttps://github.com/apra-informatica/Ti.ImageGallery/blob/master/controllers/widget.js\r\n\r\nAnd the code:\r\n\tvar index = 0;\r\n\tvar newView = Ti.UI.createView();\r\n\tvar views = $.scrollableView.views;\r\n\tviews[index].removeAllChildren();\r\n\tviews[index] = newView;\r\n\t$.scrollableView.views = views;", "attachment": [], "flagged": false, "summary": "iOS: on ScrollableView is not possible to change views", "creator": { "name": "pic", "key": "pic", "displayName": "Mauro Piccotti", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "pic", "key": "pic", "displayName": "Mauro Piccotti", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "iOS 9.1 \r\nSDK 5.1.1.GA \r\niPad 2 simulator", "closedSprints": [ { "id": 555, "state": "closed", "name": "2016 Sprint 1 SDK", "startDate": "2016-01-02T01:31:50.127Z", "endDate": "2016-01-16T01:31:00.000Z", "completeDate": "2016-01-18T00:52:43.848Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "373782", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, I tested this issue. This is a valid bug in the latest SDKs. Changing ScrollableView's view stop working in SDK 5.1.0.GA and onward. In Android it's working fine though. Please follow the sample code below. \r\n\r\n{code}\r\nvar win = Ti.UI.createWindow();\r\n\r\nvar view1 = Ti.UI.createView({ height: 300, backgroundColor:'#123' });\r\nvar view2 = Ti.UI.createView({ height: 300, backgroundColor:'#246' });\r\nvar view3 = Ti.UI.createView({ height: 300, backgroundColor:'#48b' });\r\n\r\nvar view4 = Ti.UI.createView({ height: 300, backgroundColor:'#f34' });\r\nvar view5 = Ti.UI.createView({ height: 300, backgroundColor:'#3f4' });\r\nvar view6 = Ti.UI.createView({ height: 300, backgroundColor:'#34f' });\r\n\r\nvar scrollableView = Ti.UI.createScrollableView({\r\n views:[view1,view2,view3],\r\n showPagingControl:true\r\n});\r\n\r\nwin.add(scrollableView);\r\nvar button = Titanium.UI.createButton({\r\n title: 'Hello',\r\n bottom: 10,\r\n width: 100,\r\n height: 50\r\n});\r\nwin.add(button);\r\nbutton.addEventListener('click',function(e)\r\n{\r\n scrollableView.views = [view4,view5,view6];\r\n Titanium.API.info(\"You clicked the button\");\r\n});\r\n\r\nwin.open();\r\n{code}\r\n\r\nh5. Test Environment\r\n\r\nCli 5.1.0\r\nSDK 5.1.0.GA, 5.1.1.GA\r\niOS 9.1\r\nAndroid 4.4.2\r\n\r\nThis is a valid bug.\r\n\r\n", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2016-01-05T05:33:56.000+0000", "updated": "2016-01-05T05:34:13.000+0000" }, { "id": "373804", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-01-05T13:14:32.000+0000", "updated": "2016-01-05T13:14:32.000+0000" }, { "id": "373810", "author": { "name": "pic", "key": "pic", "displayName": "Mauro Piccotti", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I hope it's the same problem.", "updateAuthor": { "name": "pic", "key": "pic", "displayName": "Mauro Piccotti", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-01-05T15:51:10.000+0000", "updated": "2016-01-05T15:51:10.000+0000" }, { "id": "373860", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Reopening ticket. Need to be revisited as it may not be the same issue as the duplicate.", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-01-06T00:13:29.000+0000", "updated": "2016-01-06T00:13:29.000+0000" }, { "id": "373861", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~cng] It doesn't look fixed with 5.1.2.\r\nWe should test the original code to be sure the issue is the same. But using the code from Sharif above, you start with 6 views, with the scollableView set to \"1, 2 and 3\" at first, which are dark blue, medium blue, and light blue. Clicking the button sets the scrollableView.views to views 4, 5 and 6. These are red, green, and blue.\r\n\r\nWith 5.0.2 SDK, things work as expected. With 5.1.0, 5.1.1, and 5.1.2.v20151216190036, clicking the button to set the views has the scrollable view go black. When you manipulate it, the colors appear again.\r\n\r\n[~ewieber] has created a ticket for this behavior mentioned above TIMOB-20199. And he will try the code from [~pic] and comment because it may be a different issue.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-01-06T00:16:29.000+0000", "updated": "2016-01-06T00:16:29.000+0000" }, { "id": "373911", "author": { "name": "apetkov", "key": "apetkov", "displayName": "Angel Petkov", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR : https://github.com/appcelerator/titanium_mobile/pull/7617\r\nPR(5_2_X) : https://github.com/appcelerator/titanium_mobile/pull/7627\r\nSame code as the one provided by Sharif. Just added boolean so you can keep switching between views by pressing the button.\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow();\r\nvar clicked = false;\r\n \r\nvar view1 = Ti.UI.createView({ height: 300, backgroundColor:'#123' });\r\nvar view2 = Ti.UI.createView({ height: 300, backgroundColor:'#246' });\r\nvar view3 = Ti.UI.createView({ height: 300, backgroundColor:'#48b' });\r\n \r\nvar view4 = Ti.UI.createView({ height: 300, backgroundColor:'#f34' });\r\nvar view5 = Ti.UI.createView({ height: 300, backgroundColor:'#3f4' });\r\nvar view6 = Ti.UI.createView({ height: 300, backgroundColor:'#34f' });\r\n \r\nvar scrollableView = Ti.UI.createScrollableView({\r\n views:[view1,view2,view3],\r\n showPagingControl:true\r\n});\r\n \r\nwin.add(scrollableView);\r\nvar button = Titanium.UI.createButton({\r\n title: 'Hello',\r\n bottom: 10,\r\n width: 100,\r\n height: 50\r\n});\r\nwin.add(button);\r\nbutton.addEventListener('click',function(e)\r\n{\r\n if (clicked == false){ \r\n\r\n scrollableView.views = [view4,view5,view6];\r\n Titanium.API.info(\"You clicked the button\");\r\n } else {\r\n\r\n scrollableView.views = [view1,view2,view3];\r\n Titanium.API.info(\"You clicked the button\");\r\n }\r\n clicked = !clicked;\r\n}); \r\n \r\nwin.open();\r\n{code}", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-01-06T17:31:10.000+0000", "updated": "2016-01-12T03:29:43.000+0000" }, { "id": "374459", "author": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Verified fixed, using:\r\n\r\nMacOS 10.11.2 (15C50)\r\nStudio 4.4.0.201511241829\r\nTi SDK 5.2.0.v20160111111831\r\nAppc NPM 4.2.2\r\nAppc CLI 5.1.0\r\nXcode 7.2 (7C68)\r\nNode v0.12.7\r\nJava 1.7.0_80\r\n\r\nTested with all provided test cases/samples. I no longer see the views inside the ScrollableView \"break\" or go black when switching between them or sets of views.", "updateAuthor": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-01-13T22:54:39.000+0000", "updated": "2016-01-13T22:54:39.000+0000" } ], "maxResults": 8, "total": 8, "startAt": 0 } } }