{ "id": "118734", "key": "TIMOB-15252", "fields": { "issuetype": { "id": "7", "description": "gh.issue.story.desc", "name": "Story", "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": null, "resolutiondate": null, "created": "2013-08-19T13:37:47.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "android", "proxy", "reference" ], "versions": [], "issuelinks": [], "assignee": null, "updated": "2018-02-28T20:04:23.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "On iOS you can do:\r\n\r\n{code}\r\nvar w = Ti.UI.createWindow({\r\n backgroundColor: 'white'\r\n});\r\n\r\nw.open();\r\n\r\nvar setter = w.setBackgroundColor;\r\n\r\nsetter('green');\r\n{code}\r\n\r\nBut on Android you'll get:\r\n\r\n{code}\r\n08-19 15:23:55.515: E/V8Exception(23104): Exception occurred at app.js:7: Uncaught TypeError: Illegal invocation\r\n{code}\r\n\r\nThis is unfortunate, because this means you cannot link an Alloy widget's exported methods through to one of it's view elements.", "attachment": [], "flagged": false, "summary": "Android: Cannot reference proxy methods", "creator": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "subtasks": [], "reporter": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "environment": "SDK 3.1.1.GA\r\nSamsung Galaxy S2, Android 4.2.3", "comment": { "comments": [ { "id": "270748", "author": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "body": "I dont think you can get a reference to a method like that on Android. It is because of the native implementation", "updateAuthor": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "created": "2013-09-11T14:03:26.000+0000", "updated": "2013-09-11T14:03:26.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }