Hi Thron,
Yeah, I know the better way to do it is using a qooxdoo class, but I just
landed on this project and almost all code uses functions implemented on
basefile.js and now it's too late to change it.
The #asset seems to be exactly what I was looking for, but right now I let
this apart and continue with other task, I will response next week if it
works.
Thank you so much
---
Seldaiendil
2011/7/22 thron7 <[email protected]>
> **
>
>
> On 07/22/2011 03:36 PM, Seldaiendil D. Flourite wrote:
>
> Hi again,
>
> I'm trying to compile my app with qooxdoo's generate.py. My app has a
> Manifest.json and the skeleton and compiles ok, but my app has a "base file"
> than contains common functions and utils without a qooxdoo class, so I need
> this class to be compiled at the top of my application files I mean, if my
> directory tree is like this:
>
> myapp/
>> source/
>> class/
>> myapp/
>> Message.js
>> ui/
>> Window.js
>> basefile.js
>
>
> I need basefile.js to be loaded first.
>
>
> qooxdoo has currently only basic support to integrate non-qooxdoo code.
> Basically, non-qooxdoo code is not analysed and not compressed, but you can
> use it as-is.
>
> What you can do is adding a 'add-script' [1] key to your build jobs
> (source-script, build-script). The crucial thing is that you specify an URI
> under which the script is accessible to the browser at run time. So you
> could just place it at some stable path under your web server, and it will
> be loaded from there.
>
> If you want to keep it with the qooxdoo app, I recommend putting it in the
> source/resource/myapp path, then the URI is the same for both source and
> build versions, and can simply be "resource/myapp/basefile.js". Then, put a
> "#asset(myapp/basefile.js)" declaration in your main Application.js, so it
> will be copied to the build path automatically when you 'generate.py build'.
>
> [1]
> http://manual.qooxdoo.org/1.5.x/pages/tool/generator_config_ref.html#add-script
>
>
>
>
> For now I hacked it to compile inserting at the top of basefile.js
>
> qx.Class.define("myapp.basefile", {});
>> qx.Class.undefine(" myapp.basefile");
>
>
> You don't need that when you use 'add-script'.
>
>
>
> The generate.py config.json has this configuration
>
> ...
>
>> "include": ["qx.*", "myapp.*"],
>>
>
> This is grossly over-generating, especially the "qx.*" will draw in hundres
> of unnecessary classes in your app, e.g. all unit test classes under
> qx.test.* . Are you sure you want this?! You also don't need "myapp.*" to
> include your basefile.js, if you use it with 'add-script'. Just take a
> default include list like
>
>
> "include" : ["myapp.Application", "myapp.theme.Theme"]
> // or ..."qx.theme.Modern" if you use this
>
>
> "library": [
>> {
>> // Qooxdoo manifest
>> "manifest": "Manifest.json"
>> },
>> // I need basefile.js to be loaded after Qooxdoo but
>> before the rest of myapp
>> {
>> // MyApp manifest
>> "manifest": "../../myapp/Manifest.json"
>> }
>> ],
>
>
> This looks like you are building your app in the framework/ folder?! Which
> would be, mh, unusual. Do it the other way round, and create your app in the
> myapp folder. You would be using the same libraries (your app and the
> framework library), but wouldn't need to tweak the framework config.json.
>
> HTH,
> T.
>
>
>
>
> ------------------------------------------------------------------------------
> 10 Tips for Better Web Security
> Learn 10 ways to better secure your business today. Topics covered include:
> Web security, SSL, hacker attacks & Denial of Service (DoS), private keys,
> security Microsoft Exchange, secure Instant Messaging, and much more.
> http://www.accelacomm.com/jaw/sfnl/114/51426210/
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>
------------------------------------------------------------------------------
10 Tips for Better Web Security
Learn 10 ways to better secure your business today. Topics covered include:
Web security, SSL, hacker attacks & Denial of Service (DoS), private keys,
security Microsoft Exchange, secure Instant Messaging, and much more.
http://www.accelacomm.com/jaw/sfnl/114/51426210/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel