Am 22.04.2013 14:20, schrieb thron7:
> 
> 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.

That's it. The documentation says that RESPATH should be set to
"./source/resource/APPLICATION_NAME". In my case that breaks the
generated meta file: the resource IDs lack the leading APPLICATION_NAME
in the path definition. If I tweak RESPATH to be set to
"./source/resource" only and add the namespace part of the path in the
images definition, it works.

Cheers,
Cajus

------------------------------------------------------------------------------
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