Hi Sanne,

I'm using the following methodology (example code, stripped down from the production file, untested):

    https://gist.github.com/level420/ea03a94115087b3c7834

But I have to admit, that this is is not based on my idea/code. In hurry of daily work the original writer got lost, so I can't give the reference and kudos back to him. I'm sorry :-(

Back to the idea, which I'm using in the end to dynamically load highcharts (along with jquery) and ckeditor. It implements a lazy loading mechanism.

It assumes that the jquery and jquery-ui files are located in resource/myapp/jquery both in a minified and non minified version, which is identified by the .min.js vs the .js file extension. The non minified version is loaded if qx.debug is set which is by default true if you are running the source version of your app.

Scripts are loaded on first instantiation of the class. All subsequent instantiations "know" that the scripts are already loaded by checking the class attribute LOADED. After the script loading finished or the scripts are already loaded, the instance method __scriptLoadedHandler is called.

If you just want to load scripts and don't need a created dom element, you have to derive from qx.core.Object and instantiate by e.g. turning the class into a singleton and calling getInstance().

I hope this will give you an idea on how to solve your problem.

Regards
Dietrich


Am 11.11.2015 um 08:52 schrieb Sanne Peters:
Hi,

I actually considered your approach in https://github.com/oetiker/QxD3/blob/master/source/class/qxd3/Svg.js ,but that is the thing that I wanted to prevent, because I would like to easily upgrade the third party library with npm (package.json) or something along those lines.

kind regards,


Sanne Peters
*Interaction Design*

Realtime Solutions B.V.
Torenallee 20
5617 BC Eindhoven

*Tel:* 040 4022 726 | *E-mail:* sanne.pet...@realtimesolutions.nl | *Website:* http://www.realtimesolutions.nl

On 10/11/15 14:10, Tobias Oetiker wrote:


------------------------------------------------------------------------------
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to