{ "id": "94714", "key": "TIMOB-9913", "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": "15715", "description": "2013 Sprint 25", "name": "2013 Sprint 25", "archived": true, "released": true, "releaseDate": "2013-12-13" }, { "id": "15716", "description": "2013 Sprint 25 API", "name": "2013 Sprint 25 API", "archived": true, "released": true, "releaseDate": "2013-12-13" }, { "id": "15422", "description": "Release 3.3.0", "name": "Release 3.3.0", "archived": false, "released": true, "releaseDate": "2014-07-16" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-12-02T23:51:10.000+0000", "created": "2012-07-10T04:38:59.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "core", "insight", "module_map", "parity", "qe-closed-3.3.0", "qe-testadded" ], "versions": [ { "id": "13272", "description": "Release 2.0.1", "name": "Release 2.0.1", "archived": true, "released": true, "releaseDate": "2012-04-16" } ], "issuelinks": [], "assignee": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2014-04-28T09:28:14.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": "This is not a regression. It exists as far as 1.8.2.\r\nIssue - While running the app, it gives error \"Property 'animate' of object # is not a function\". As per docs, it is also a method. This issue does not comes in iOS. There it works as expected.\r\n\r\nSteps to reproduce:\r\n1) Use the code below\r\n{code}\r\nvar win = Ti.UI.createWindow();\r\n \r\n var scrollView = Ti.UI.createScrollView({\r\n contentHeight: 'auto',\r\n contentWidth: 'auto',\r\n layout:'vertical', //Change from default value from absolute to a relative distance between the sibling views\r\n scrollType:\"vertical\",\r\n top: 0,\r\n showVerticalScrollIndicator: true,\r\n showHorizontalScrollIndicator: false\r\n }); \r\n \r\n var mapView = Ti.Map.createView({\r\n mapType: Ti.Map.STANDARD_TYPE,\r\n height: 150,\r\n top:0,\r\n animate:true,\r\n regionFit:true,\r\n userLocation:true,\r\n annotations:[]\r\n });\r\n \r\n var resizeBtn = Ti.UI.createButton({\r\n title:\"resize map\",\r\n width:100,\r\n height:44,\r\n right:5,\r\n bottom:5\r\n });\r\n var mapToggle = false;\r\n resizeBtn.addEventListener(\"click\", function(e){\r\n mapToggle = !mapToggle;\r\n if(mapToggle){\r\n mapView.animate({height:250, duration:300});\r\n } else {\r\n mapView.animate({height:150, duration:300});\r\n }\r\n });\r\n mapView.add(resizeBtn);\r\n scrollView.add(mapView);\r\n \r\n //other content\r\n var testView = Ti.UI.createView({top:0, height:200, width:300, backgroundColor:\"red\"});\r\n \r\n var resize2Btn = Ti.UI.createButton({\r\n title:\"resize view\",\r\n width:120,\r\n height:44,\r\n right:5,\r\n bottom:5\r\n });\r\n var toggle = false;\r\n resize2Btn.addEventListener(\"click\", function(e){\r\n toggle = !toggle;\r\n if(toggle){\r\n testView.animate({height:300, duration:300});\r\n } else {\r\n testView.animate({height:200, duration:300});\r\n }\r\n });\r\n testView.add(resize2Btn);\r\n scrollView.add(testView);\r\n \r\n //other content\r\n scrollView.add(Ti.UI.createView({top:0, height:200, width:300, backgroundColor:\"blue\"}));\r\n \r\n win.add(scrollView);\r\n \r\nwin.open();\r\n{code}\r\n2) Click the button 'resize map'\r\n\r\nActual result\r\n1) After step 2,a runtime error is shown stating property 'animate' of object # is not a function.\r\n\r\nExpected result\r\n1) Animate should also be treated as a function (as per docs).", "attachment": [], "flagged": false, "summary": "Android: Map:View:'Animate' is also a function as per docs, but app is treating it as a property", "creator": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Adding environment info -\r\nTested with Titanium SDK: 2.1.0.v20120628121617\r\nTested with Titanium  Studio: 2.1.0.201206251749\r\nDevice - Android emulator\r\nMachine OS - MAC 10.7.3", "comment": { "comments": [ { "id": "267199", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "TESTING NOTES:\r\n\r\n* Run this app.js, which is the same as the reporter's app.js except the \"animate\" property is set conditionally only if iOS.\r\n\r\n* Click the \"Resize Map\" button - the map should resize without runtime error.\r\n\r\n{code:title=app.js}\r\nvar win = Ti.UI.createWindow();\r\n \r\n var scrollView = Ti.UI.createScrollView({\r\n contentHeight: 'auto',\r\n contentWidth: 'auto',\r\n layout:'vertical', //Change from default value from absolute to a relative distance between the sibling views\r\n scrollType:\"vertical\",\r\n top: 0,\r\n showVerticalScrollIndicator: true,\r\n showHorizontalScrollIndicator: false\r\n }); \r\n \r\n var mapView = Ti.Map.createView({\r\n mapType: Ti.Map.STANDARD_TYPE,\r\n height: 150,\r\n top:0, \r\n regionFit:true,\r\n userLocation:true,\r\n annotations:[]\r\n });\r\n\r\n if (Ti.Platform.osname == 'ipad' || Ti.Platform.osname == 'iphone') {\r\n mapView.animate = true;\r\n }\r\n \r\n var resizeBtn = Ti.UI.createButton({\r\n title:\"resize map\",\r\n width:100,\r\n height:44,\r\n right:5,\r\n bottom:5\r\n });\r\n var mapToggle = false;\r\n resizeBtn.addEventListener(\"click\", function(e){\r\n mapToggle = !mapToggle;\r\n if(mapToggle){\r\n mapView.animate({height:250, duration:300});\r\n } else {\r\n mapView.animate({height:150, duration:300});\r\n }\r\n });\r\n mapView.add(resizeBtn);\r\n scrollView.add(mapView);\r\n \r\n //other content\r\n var testView = Ti.UI.createView({top:0, height:200, width:300, backgroundColor:\"red\"});\r\n \r\n var resize2Btn = Ti.UI.createButton({\r\n title:\"resize view\",\r\n width:120,\r\n height:44,\r\n right:5,\r\n bottom:5\r\n });\r\n var toggle = false;\r\n resize2Btn.addEventListener(\"click\", function(e){\r\n toggle = !toggle;\r\n if(toggle){\r\n testView.animate({height:300, duration:300});\r\n } else {\r\n testView.animate({height:200, duration:300});\r\n }\r\n });\r\n testView.add(resize2Btn);\r\n scrollView.add(testView);\r\n \r\n //other content\r\n scrollView.add(Ti.UI.createView({top:0, height:200, width:300, backgroundColor:\"blue\"}));\r\n \r\n win.add(scrollView);\r\n \r\nwin.open();\r\n\r\n{code}", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-08-19T20:55:30.000+0000", "updated": "2013-08-19T21:18:35.000+0000" }, { "id": "267200", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR ready:\n\nhttps://github.com/appcelerator/titanium_mobile/pull/4582", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-08-19T20:57:01.000+0000", "updated": "2013-08-19T20:57:01.000+0000" }, { "id": "302684", "author": { "name": "prastogi", "key": "prastogi", "displayName": "Pragya Rastogi", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Verified the fix using:\r\nOSX: 10.9.2\r\nXcode: 5.1.1\r\nStudio - 3.3.0.201404251359\r\nSDK - 3.3.0.v20140425191906\r\nacs-1.0.14\r\nalloy-1.4.0-dev\r\nnpm-1.3.2\r\ntitanium-3.3.0-dev\r\ntitanium-code-processor-1.1.1-beta1\r\nDevice: LG-P970 (4.0.4)", "updateAuthor": { "name": "prastogi", "key": "prastogi", "displayName": "Pragya Rastogi", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2014-04-28T09:27:20.000+0000", "updated": "2014-04-28T09:27:20.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }