On 07/04/2011 01:18 PM, Jeroen Smit wrote:
> Hi Alex,
>
> I am a lot further than last week.
> One of the major problems I have left is around the use of resources.
> As I wrote before, we generate our client on the server so everything is
> dynamic.
> Images are also determined at runtime and the URL's are sent to the client.
>
> What I found out, is that the generate scripts do all sorts of smart
> filtering and inlining for resources used in JavaScript code.
> This conflicts with how we use the resources, because they are not hard code.
> Is there a way to work around that, but stil use the "generate.py build" and
> "generate.py source-all" options?
This question is bit broad to give a good answer, and you could explain
more which kinds of URLs are sent to the client and in which places
these URLs are used.
In general, there is no problem using variables in places where you
would use a resource id, e.g.
var b = new qx.ui.form.Button("Push this", img);
as long as 'img' resolves to a resource id at run time, like
'myapp/images/i.png'. (A resource id is the path to an image file down
from the 'source/resource' folder of a qooxdoo app, and including the
file name).
All you have to take care of is that all resource id's that 'img' could
potentially resolve to are requested by the class code through #asset,
e.g.:
#asset(myapp/images/*)
If you don't even know the *set* of images you will be needing during
run time, you could fall back to using straight URIs as values for
'img'. But those are "unmanaged resources" for the qooxdoo run time, and
you pay a penalty for using them (e.g. rendering delay).
For the build version of an app, qooxdoo copies all known necessary
images to the build/resource folder, so everything is contained under
'build'. If you then want to store those images on another server, or a
special path, for deployment you can do so if you retain the folder
structure under build/resource, and add the root URI to the new location
in your build configuration:
"build-script" : {
"compile-options" : {
"uris" : {
"resource" : "http://imgs.myserver.com/path/to/resource/root"
T.
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel