[TIMOB-15252] Android: Cannot reference proxy methods
GitHub Issue | n/a |
---|---|
Type | Story |
Priority | Low |
Status | Open |
Resolution | Unresolved |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Android |
Labels | android, proxy, reference |
Reporter | Fokke Zandbergen |
Assignee | Unknown |
Created | 2013-08-19T13:37:47.000+0000 |
Updated | 2018-02-28T20:04:23.000+0000 |
Description
On iOS you can do:
var w = Ti.UI.createWindow({
backgroundColor: 'white'
});
w.open();
var setter = w.setBackgroundColor;
setter('green');
But on Android you'll get:
08-19 15:23:55.515: E/V8Exception(23104): Exception occurred at app.js:7: Uncaught TypeError: Illegal invocation
This is unfortunate, because this means you cannot link an Alloy widget's exported methods through to one of it's view elements.
I dont think you can get a reference to a method like that on Android. It is because of the native implementation