Thanks for the detailed reply. See below for some comments
In fact, there is a config key ("compile-options/loader-template"[1])
> that allows you to specify a custom loader template.
>
> [1]
>
> http://qooxdoo.org/documentation/1.0/tool/generator_config_ref#compile-options
>
Yes, I had found that already as written in my original post
> > So far the only way I have found is using a custom template for the
> > loader. However this has the disadvantage that I now have to maintain in
> > parallel with the official one (if you guys change it for a new Qx
> > release, I have to update mine to match yours).
>
> Yes, but that cannot be avoided, can it?!
>
It could, if you just add a hook that would prepend some code to the loader.
> > Besides I have found 3
> > samples templates:
> >
> > file:///usr/local/opt/qooxdoo/tool/data/generator/loader-build.tmpl.js
> > file:///usr/local/opt/qooxdoo/tool/data/generator/loader-source.tmpl.js
> > file:///usr/local/opt/qooxdoo/tool/data/generator/loader.tmpl.js
>
> These are not sample templates, but the actual templates which are used
> to generate the applications.
>
> > So which one should I use?
>
> This depends on the qooxdoo version you are running.
>
> > I have to maintain two different ones for
> > source and build? and what is the one without -source or -build in the
> name?
>
> The unified template is newer, the build-specific ones are older.
>
I am using latest version (1.0.1) so I will use the unified one
>
> > Is there an easier way? I'd just like to point to a custom JS file that
> > the generator would just prepend to the loader, is that implemented yet?
>
> Prepend to the loader - no. If you need code to be run before the
> qooxdoo loader add another <script> tag in your index.html before the
> one the fetches the loader. There is a hook to load JS code *after* the
> loader ("add-script"). This ususally suffices if you just want some
> additional JS code being available for your class code. If you want to
> modify the way URIs are computed in the ResourceManager during run time,
> there is the "compile-options/decode-uris-plug". If you need to tweak
> the loader in any other way, you have to create your own loader template.
>
I see what you mean. I really needed to prepend to the loader so I just
modified the template and added my code to it. I will have to update it
everytime I update Qx, but I guess it is OK.
Thanks for the help.
Jean-Noel
------------------------------------------------------------------------------
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel