On 04/22/2013 01:26 PM, Cajus Pollmeier wrote:
> Am 22.04.2013 10:36, schrieb thron7:
> Does "#asset the individual images" mean that *every* images needs an
> own asset? Currently I'm using a wildcard for that. Now: tried with and
> without.

Wildcards are fine as long as the images that get actually used are 
included.

>
> Did that using "distclean" and "source" / "build". The combined image
> does not show up in "build" - and according to the network console in
> Chrome, it is not accessed when loading "source". The individual images
> are still accessed (in Chrome).

Another crucial thing when using combined images are the contained 
images' resource IDs. Like most resources in a qooxdoo application, 
images are identified by their "resource ID". If you create a combined 
image you have to take care that the resource IDs generated into the 
.meta file actually match the resource IDs you use in your app. If this 
fails the Generator will not be able to identify that a required image 
is actually contained in a combined one. Example:

Say you have an image source/resource/foo/bar/i.png in your app 
directory structure. The resource ID of this image will be 
"foo/bar/i.png" (e.g. the path beneath the resource root 
source/resource, including the app's name space). And this is how you 
reference it in your app:

#asset(foo/bar/i.png)
...
var b = qx.ui.form.Button("My Button" , "foo/bar/i.png");
...

When you create a combined image, for flexibility reasons, there is no 
restriction to where on your disk images may lie that you include. But 
you have to make sure that the path suffix still reflects the resource 
ID of that image. In the above example you can just look into the .meta 
file to ensure that the image is there with its resource ID, as a map key:
{..., "foo/bar/i.png" : {...}, ...}

You can control the resource ID of any contained image that goes into 
the .meta file with the 
"combine-images/images/<comb_img_path>/input/prefix" config key, which 
should specify the path prefix that, when stripped from the input image 
path, leaves you with the resource ID.

I see the Image clipping and combining section in the manual is not 
consistent about this (the RESPATH macro used includes the application 
namespace which must not be stripped), please open a bug for it.

>
> Is there a point somewhere in the generator where I can debug why it
> thinks the images are taken? -vvv doesn't mention images or
> investigating meta files.

Indeed, there is currently no debugging support for combined image 
handling (and you might want to add a bug for this, too). The whole 
thing is usually fairly robust. Just check the resource IDs in the .meta 
file. If they are correct, and it's still not working, get back.

T.


------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to