[TIMOB-1005] Functions and currentWindow on Android broken
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T01:54:56.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.5.0 |
Components | Android |
Labels | android, defect, kroll |
Reporter | Konstantin |
Assignee | Blain Hamon |
Created | 2011-04-15T02:41:20.000+0000 |
Updated | 2011-04-17T01:54:56.000+0000 |
Description
Platform 1.3.0 OS MacOSX/WinXP, iPhone emulator 3.1.3, android emulator 2.1
Please take a look at example on the documentation page for Titanium.UI.Window, "Passing data" section. You have variable a and method b. I tried to reproduce this in my project. In app.js I have method, variable, TabGroup, 2 Tabs which have windows created with url property and a and b attached. I can access a and b from child window on iPhone, but only variable a on Android. When I try to call method b, smth. like Titanium.UI.currentWindow.b() I get an error from rhino JS library, smth. like "b is not a method, it's an object and not callable". Actually it's true, on Android, b is an object of KrollContext, not function, I can see this when I print Titanium.UI.currentWindow.b to standard output. I even can call Titanium.UI.currentWindow.b.call() and it even works but I can't pass any arguments to b, anyway, IMHO this feature is totally broken on Android. iPhone is OK here
Correction: not KrollContext but KrollCallback
Finally I'd like to say, it's not only problem of currentWindow property, any *Proxy object's custom methods have same problem, for example:
raises same error, specialHandler is not a method anymore. It's a blocking bug for me on Android
This is really a duplicate, special case of #915
Confirm this works as it should w/ new Kroll
(from [ad1506dc5a33e2f763f9ec37a6fbd3245c7fb728]) added a test for custom proxy instance methods [#1005 state:fixed-in-qa] https://github.com/appcelerator/titanium_mobile/commit/ad1506dc5a33e2f763f9ec37a6fbd3245c7fb728"> https://github.com/appcelerator/titanium_mobile/commit/ad1506dc5a33...
Pass Titanium SDK version: 1.5.0 (12/01/10 09:30 ac7cfd8) drillbit test Android Sim 1.6/2.1
android sim 1.6
https://5111068499667359260-a-appcelerator-com-s-sites.googlegroups.com/a/appcelerator.com/android/screenshots/Screenshot2010-12-02at2.30.47AM.png?attachauth=ANoY7crKsfvMfdez3l27wnG_vOB0igXOd2AW8GVzP33R4KO4JNDSdg0wYeWx8OR34RLcQs0pfHxUiuoIsoVb5OClouqEI_CmWLRvbhD64WJg7KiGw4U6-679XjvXSqApaVCVyGqDjjfcHnceQepDqw0Wky44GDYZpomldZ1mAY0K0qqkI_BWhN2ETrFqCIPUjsjX6ZtLnuIJ5H1eYOg2P-M9OoYJKY6_TozjeA9AGUlbA3qoW-OTVh0%3D&attredirects=0"> https://5111068499667359260-a-appcelerator-com-s-sites.googlegroups...
android sim 2.1
https://5111068499667359260-a-appcelerator-com-s-sites.googlegroups.com/a/appcelerator.com/android/screenshots/Screenshot2010-12-02at2.48.13AM.png?attachauth=ANoY7cqZMHs0_-0NFdd52s4sE13MK769EMBj1VEL9mkQdyPJ_1Lylg56ioZ3EKIhrSl7RMoVTCAI9cY4-jfDs6mOqdJOyP9mQrY28Zjh5vBQGQ6_377a21CU3cn9Al6-wi8damB2gpx5waY3FoILV9l9iIqifi6D5Jue3Rbig8yVLAwmls-q_qLFApWfmRmL9V7zuCx18cVF9-Om9uMmhzz7EKdEBj6cJ1MuzGF5vuOn6vTnexNmgr0%3D&attredirects=0"> https://5111068499667359260-a-appcelerator-com-s-sites.googlegroups...
Did this got resolved?