[TIMOB-2850] Android: Yahoo module yql() calls fail if Ti.Network not used anywhere else in app
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Trivial |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T02:00:15.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.6.0 M06 |
Components | Android |
Labels | android, defect, release-1.6.0, reported-1.5.1, yahoo |
Reporter | Bill Dawson |
Assignee | Bill Dawson |
Created | 2011-04-15T03:31:08.000+0000 |
Updated | 2011-04-17T02:00:15.000+0000 |
Description
Failcase app.js:
Titanium.UI.setBackgroundColor('#000');
Ti.Yahoo.yql('select * from flickr.photos.search where text="Cat" limit 10', function(e) { });
Run that and it results in "Cannot call method 'createHTTPClient' of undefined" error.
If you modify it to look like this...
Titanium.UI.setBackgroundColor('#000');
Ti.Network.creatHTTPClient(); // DUMMY
Ti.Yahoo.yql('select * from flickr.photos.search where text="Cat" limit 10', function(e) { });
... it will work without error. I presume this is because our
module detection code will see that
Ti.Network.createHTTPClient
and then include the
titanium-network module in the APK. It's required for our yahoo
module because the yql stuff works by loading and eval'ing a
special Javascript file, yahoo.js.
(from [8f40abf91e7ed13e99076a322dc82b3c6686b0d5]) [#2850 state:fixed-in-qa] declare that yahoo module is dependent on network module. https://github.com/appcelerator/titanium_mobile/commit/8f40abf91e7ed13e99076a322dc82b3c6686b0d5"> https://github.com/appcelerator/titanium_mobile/commit/8f40abf91e7e...
(from [50e4fd31fa594381cad72b1b0e53790e0c39b9dd]) [#2850 state:fixed-in-qa] declare that yahoo module is dependent on network module. https://github.com/appcelerator/titanium_mobile/commit/50e4fd31fa594381cad72b1b0e53790e0c39b9dd"> https://github.com/appcelerator/titanium_mobile/commit/50e4fd31fa59...
Verified on G1/1.6 and Nexus One/2.2.1 using build #e1cb22a