Hi,

i propose qx.bom.request.Script() for this purpose, just like in the Mobile 
Showcase "maps" example 

https://github.com/qooxdoo/qooxdoo/blob/master/application/mobileshowcase/source/class/mobileshowcase/page/Maps.js


 /**
     * Loads JavaScript library which is needed for the map.
     */
    _loadMapLibrary : function() {

      var self = this;
      var req = new qx.bom.request.Script();

      req.onload = function() {
        self._map = new OpenLayers.Map("osmMap");
        self._mapnikLayer = new OpenLayers.Layer.OSM("mapnik",null,{});

        self._map.addLayer(self._mapnikLayer);

        self._zoomMapToDefaultPosition();
      }

      req.open("GET", this._mapUri);
      req.send();
    },

For the generator warning, please add an ignore tag at the beginning of the 
class:

#ignore(CryptoJS)

(directly after the #asset, just like in the maps example, too)

Greetz Christopher





________________________________________
Von: Marc-André Dubois [[email protected]]
Gesendet: Dienstag, 19. Februar 2013 17:10
An: [email protected]
Betreff: [qooxdoo-devel] Using external library

Hi,

I have this javascript library : 
http://crypto-js.googlecode.com/svn/tags/3.1.2/build/rollups/sha256.js

I want to use it in my mobile application.

I put it in source/script directory.

I add reference in index.html : <script type="text/javascript" 
src="script/sha256.js"></script>

In qooxdoo app, I can use this folowing code to call function : 
CryptoJS.SHA256(password);

But in console, ./generate.py source show warning :

>>> Collecting classes  -
      - Warning: com.lanauco.mobile.core.security.service.Login (42,37): 
Unknown global symbol used: 'CryptoJS.SHA256'

And the Builded App doesn’t work : Uncaught ReferenceError: CryptoJS is not 
defined

How can I use my imported script correctly?

Thank you and have a nice day!

Marc-André Dubois
[email protected]
Programmeur-Analyste
[cid:[email protected]]
1.877.881.5151 p.261 (sans frais).
450.831.5151 p.261
450.839.1103 (Fax)
Web : http://www.lanauco.com<http://www.lanauco.com/>
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to