Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-2850] Android: Yahoo module yql() calls fail if Ti.Network not used anywhere else in app

GitHub Issuen/a
TypeBug
PriorityTrivial
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T02:00:15.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.6.0 M06
ComponentsAndroid
Labelsandroid, defect, release-1.6.0, reported-1.5.1, yahoo
ReporterBill Dawson
AssigneeBill Dawson
Created2011-04-15T03:31:08.000+0000
Updated2011-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.

Comments

  1. Bill Dawson 2011-04-15

    (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...

  2. Bill Dawson 2011-04-15

    (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...

  3. Don Thorp 2011-04-15

    Verified on G1/1.6 and Nexus One/2.2.1 using build #e1cb22a

JSON Source