{ "id": "85467", "key": "TIMOB-7400", "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": "12095", "description": "", "name": "Sprint 2012-03", "archived": true, "released": true, "releaseDate": "2012-02-12" }, { "id": "12593", "name": "Release 2.0.0", "archived": false, "released": true, "releaseDate": "2012-03-30" }, { "id": "13070", "description": "Release 1.8 Service Pack 2", "name": "Release 1.8.2", "archived": true, "released": true, "releaseDate": "2012-02-29" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-03-11T22:31:13.000+0000", "created": "2012-01-25T13:49:19.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "parity", "qe-and012312", "qe-testadded" ], "versions": [ { "id": "12580", "description": "Dual Runtime 1.8.0", "name": "Release 1.8.0.1", "archived": true, "released": true, "releaseDate": "2011-12-22" }, { "id": "12677", "description": "Release 1.8 Service Pack 1", "name": "Release 1.8.1", "archived": true, "released": true, "releaseDate": "2012-01-31" } ], "issuelinks": [ { "id": "14783", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "81948", "key": "TIMOB-5861", "fields": { "summary": "iOS: scrollView is not updated correctly.", "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": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2012-03-11T22:31:13.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" } ], "description": "Steps to reproduce:\r\n1. Launch the following code in app.js:\r\n{code:title=app.js}\r\nvar win = Titanium.UI.createWindow({ \r\n layout:'vertical',\r\n backgroundColor:'#fff'\r\n});\r\n\r\nvar scrollView = Ti.UI.createScrollView({\r\n\tshowHorizontalScrollIndicator:true, showVerticalScrollIndicator:true,\r\n\twidth: 250, height: 100, top: 50,\r\n\tborderColor:'green', borderWidth:1,\r\n\tcontentWidth:1000, contentHeight:100\r\n});\r\n\r\nfor(var i=0; i<10; i++) {\r\n\tfor(var j=0; j<10; j++) {\r\n\t\tscrollView.add(Ti.UI.createLabel({\r\n\t\t\ttop:i*100, left:j*100,\r\n\t\t\twidth:100, height:100,\r\n\t\t\ttext:i+':'+j, textAlign:'center',\r\n\t\t\tcolor:'white',\r\n\t\t\tbackgroundColor:'#A0' + Number(i%2*8).toString(16) +'0'+ Number(8-j%2*8).toString(16)+'0',\r\n\t\t\tborderColor:'black', borderWidth:1 \r\n\t\t}));\r\n\t}\r\n}\r\n\r\nvar button = Ti.UI.createButton({title:'Flip', width:100, height:50});\r\nbutton.addEventListener('click', function() {\r\n\tscrollView.width = 100;\r\n\tscrollView.height = 250;\r\n\t\r\n\tscrollView.contentWidth = 100;\r\n\tscrollView.contentHeight = 1000;\r\n\r\n\tbutton.title = 'Click again';\r\n\t\r\n});\r\n\r\nscrollView.addEventListener('scroll', function() {\r\n // bug is here \r\n\tTi.API.info('Offset: (' + scrollView.contentOffset.x + ', ' + scrollView.contentOffset.y + ')');\r\n});\r\nwin.add(scrollView);\r\nwin.add(button);\r\nwin.open();\r\n{code}\r\n\r\nActual: Runtime error occur. See attachment.\r\nExpected: Should not get a runtime error. Above code ran without error in iOS\r\n\r\nNote: Occurs in 1.8.0.1", "attachment": [ { "id": "25329", "filename": "device-2012-01-25-125800.png", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-01-25T13:49:19.000+0000", "size": 30164, "mimeType": "image/png" } ], "flagged": false, "summary": "Android: ScrollView - Runtime error generated when scrollView.contentOffset object is used in a call back function", "creator": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "environment": "SDK build: 1.8.0.1, 1.8.1.v20120124200134\r\nRuntime: v8, rhino\r\nOS: Mac OS X Lion (10.7.2)\r\nTitanium Studio, build: 1.0.8.201201210622\r\nDevice: Nook Color (2.2)", "comment": { "comments": [ { "id": "182289", "author": { "name": "opiecyrus", "key": "opiecyrus", "displayName": "Opie Cyrus", "active": true, "timeZone": "America/Chicago" }, "body": "updated title", "updateAuthor": { "name": "opiecyrus", "key": "opiecyrus", "displayName": "Opie Cyrus", "active": true, "timeZone": "America/Chicago" }, "created": "2012-02-07T15:21:59.000+0000", "updated": "2012-02-07T15:21:59.000+0000" }, { "id": "182339", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Testing code: \r\n{code}\r\nvar win = Titanium.UI.createWindow({ \r\n layout:'vertical',\r\n backgroundColor:'#fff'\r\n});\r\n\r\nvar scrollView = Ti.UI.createScrollView({\r\n\tshowHorizontalScrollIndicator:true, showVerticalScrollIndicator:true,\r\n\twidth: 250, height: 100, top: 50,\r\n\tborderColor:'green', borderWidth:1,\r\n\tcontentWidth:1000, contentHeight:100, contentOffset:{\"x\":300, \"y\":0}\r\n});\r\n\r\nscrollView.contentOffset = {\"x\":400, \"y\":100}; \r\n\r\nfor(var i=0; i<10; i++) {\r\n\tfor(var j=0; j<10; j++) {\r\n\t\tscrollView.add(Ti.UI.createLabel({\r\n\t\t\ttop:i*100, left:j*100,\r\n\t\t\twidth:100, height:100,\r\n\t\t\ttext:i+':'+j, textAlign:'center',\r\n\t\t\tcolor:'white',\r\n\t\t\tbackgroundColor:'#A0' + Number(i%2*8).toString(16) +'0'+ Number(8-j%2*8).toString(16)+'0',\r\n\t\t\tborderColor:'black', borderWidth:1 \r\n\t\t}));\r\n\t}\r\n}\r\n\r\nvar button = Ti.UI.createButton({title:'Flip', width:100, height:50});\r\nbutton.addEventListener('click', function() {\r\n\tscrollView.width = 100;\r\n\tscrollView.height = 250;\r\n\t\r\n\tscrollView.contentWidth = 100;\r\n\tscrollView.contentHeight = 1000;\r\n\r\n\tbutton.title = 'Click again';\r\n\t\r\n});\r\n\r\nscrollView.addEventListener('scroll', function(e) {\r\n // bug is here \r\n\tTi.API.critical(\"x: \" + scrollView.contentOffset.x + \" y: \" + scrollView.contentOffset.y);\r\n});\r\nwin.add(scrollView);\r\nwin.add(button);\r\nwin.open();\r\n{code}", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-02-07T19:06:10.000+0000", "updated": "2012-02-07T19:06:10.000+0000" }, { "id": "182574", "author": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "No longer getting the runtime error, however the vertical scroll is not responding\r\nTested with 1.9.0.v20120208180134 on Droid 3 (2.3.4)", "updateAuthor": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-02-09T10:09:26.000+0000", "updated": "2012-02-09T10:09:26.000+0000" }, { "id": "182576", "author": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Vertical scroll issue has a separate bug TIMOB-7402 closing this as we no longer get the runtime error", "updateAuthor": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-02-09T10:20:52.000+0000", "updated": "2012-02-09T10:20:52.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }