Hi Thomas,
it came down to the fact that the grid decorator *requires* the sliced
images, so I rolled back and use my image.json again. (This was obviously
the reason I used the image.json in first place ;-))
OK and here we go again with the NoneType problem:
But here's the resolution:
The 'NoneType'-Error was thrown, because the generator script *REQUIRES*,
that there is a prefix property (even if it is set to the empty list) - the
manual is not really clear about this:
"combine-images" :
{
"images" :
{
"${THEME_PATH}/button-combined-tb.png":
{
"prefix" : [], //**removing property "prefix" triggers the error
"input" :
[
{
"prefix" : [], // again required!!
"files" :
[
"${THEME_PATH}/button-[tb]*.png",
"${THEME_PATH}/button-pressed-[tb]*.png",
"${THEME_PATH}/button-disabled-[tb]*.png",
"${THEME_PATH}/button-focused-[tb]*.png"
]
} ],
"layout" : "vertical"
},
best
andy
On 20.10.10 20:17, "thron7" <[email protected]> wrote:
>
>
> On 10/20/2010 07:48 PM, Andy Fuchs wrote:
>> Thanks for this explanation.
>>
>> Although I dont really understand what's going on under the hood. Basically
>> I don't want to get sliced/combined images,
>
> Ok, but why then did you start using the image.json in the first place?
>
>> so I got rid of the 'image.json'
>> alltogether, but then the controls, etc... are not shown at all on the
>> resulting built webpage.
>
> Removing the image.json only deprives you of the possibility to re-run
> the image combining job, but it doesn't remove any existing combined
> images. Did you remove the combined images as well? Did you also remove
> the corresponding .meta files?
>
>>
>> If I do image slicing/combining and throw away all those sliced/combined
>> images (resulting in the exact same folder structure as before), my custom
>> controls ARE shown.
>
> Did you also throw away the .meta files? Did you re-run 'generate.py
> source'?
>
>> I just don't understand where those ResourceIDs get
>> defined.
>
> As I wrote in my previous mail, the resource id of e.g. an image file is
> the path suffix down from, but not including, the 'source/resource'
> folder under your main application directory. So essentially the file
> name and (part of) its location on the file system define the resource id.
>
>> I just want to use my graphics unsliced and uncombined...
>>
>> I have those files in
>>
>> resources/andytest/theme/
>
> Is 'resources' really 'resource' under 'source?
>
>> button-disabled.png
>> button-focused.png
>> button-pressed.png
>> button.png
>> tabview-active.png
>> ...
>>
>> I re-verified all paths in decoration and appearance and they are ok:
>>
>> "andytest-window" :
>> {
>> decorator : qx.ui.decoration.Grid,
>>
>> style :
>> {
>> baseImage : "andytest/theme/window.png",
>
> This looks good, assuming the root resource directory is correct. Maybe
> you want to re-cap the basic application structure [1].
>
>> insets : [1,2,1,1]
>> }
>> },
>> ...
>>
>> I'd really appreciate, if someone could explain in terms that I understand,
>> what I need to define, so the mentioned images are properly shown.
>
> If you remove all combined images and their corresponding .meta files,
> just re-run 'generate.py source', and your app should display correctly.
> If it doesn't, use a browser inspection tool like Firebug for Firefox,
> and inspect the missing image. You can see from the used URL in the DOM
> element which file it is trying to load. Post this path if it doesn't
> make sense to you.
>
>
> HTH,
> T.
>
> [1]
> http://manual.qooxdoo.org/1.2.x/pages/getting_started/application_structure.ht
> ml
>
>>
>> thanks
>>
>> andy
>>
>>
>>
>> On 20.10.10 18:25, "thron7" <[email protected]> wrote:
>>
>>>
>>>
>>> On 10/20/2010 05:55 PM, Andy Fuchs wrote:
>>>> BTW: Could you explain what all these 'prefixes' mean? It now works through
>>>> try and error, but I don't really understand what I'm doing :-/
>>>
>>> If you look into the generated .meta file, it might dawn on you :). The
>>> strings that identify images in there, so called "resource ID's", can
>>> only be inferred from the file path if the generator knows where to
>>> "chop off" a prefix path that doesn't belong to the ID. That's the whole
>>> issue about the prefixes. (You can even have the generator cut off a
>>> prefix from the path, and replace it with some substitute, to arrive at
>>> a proper resource id).
>>>
>>> Resource id's are used throughout qooxdo code to refer to images, css
>>> files and such. They have to be "globally unique" in the scope of the
>>> application (i.e. all code including application code, framework
>>> classes, and all used qooxdoo libraries and contribs). Therefore, all
>>> resource id's start with the name space of the library they belong to,
>>> like "qx/*" for resource id's from the framework, or "myapp/*" for a
>>> custom application called "myapp". Then the remaining path up to the
>>> file name ensues, like they are usually stored under the
>>> "source/resource" folder of a qooxdoo app.
>>>
>>> To keep things "simple" and allow you to combine images in arbitrary
>>> paths on your file system, you have to specify the prefixes for the
>>> cut-off. The alternative would be to force all involved images to be
>>> under some qooxdoo library's source/resource path when combining them,
>>> which seemed to be too much restriction at the time the feature was
>>> implemented.
>>>
>>>>
>>>> The info in the manual is not very enlightening here...
>>>>
>>>> "images" :
>>>> {
>>>> //OK - this is where the combined file is saved
>>>> "${THEME_PATH}/button-combined-tb.png":
>>>> {
>>>> //??
>>>> "prefix": [ "${THEME_PATH2}" ],
>>>
>>> Chop-off prefix for the result (combined) image.
>>>
>>>> "input" :
>>>> [
>>>> {
>>>> //??
>>>> "prefix": [ "${THEME_PATH2}" ],
>>>
>>> Chop-off prefix for this group of input images.
>>>
>>>> "files" :
>>>> [
>>>> // this is were the source files are located...
>>>> "${THEME_PATH2}/button-[tb]*.png",
>>>> "${THEME_PATH2}/button-pressed-[tb]*.png",
>>>> "${THEME_PATH2}/button-disabled-[tb]*.png",
>>>> "${THEME_PATH2}/button-focused-[tb]*.png"
>>>> ]
>>>> }
>>>> ],
>>>>
>>>
>>> So, in this (I hope made-up) example, ${THEME_PATH2} would be stripped
>>> from the result image path to derive its id, assuming that THEME_PATH2
>>> is a proper substring of THEME_PATH, as otherwise
>>> "button-combined-tb.png" IS NOT a legal resource id.
>>>
>>> In the same vein, for the input images THEME_PATH2 CANNOT be a valid
>>> prefix, as when stripped from the input file path, the remaining path
>>> like "button-t.png" cannot be a valid resource id. Therefore, the above
>>> config would run, but would not create a usable .meta file for the
>>> combined image.
>>>
>>> HTH,
>>> T.
>>>
>>> ----------------------------------------------------------------------------
>>> --
>>> Nokia and AT&T present the 2010 Calling All Innovators-North America contest
>>> Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
>>> $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
>>> Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
>>> http://p.sf.net/sfu/nokia-dev2dev
>>> _______________________________________________
>>> qooxdoo-devel mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>>>
>>
>>
>>
>>
>>
----------------------------------------------------------------------------->>
-
>> Nokia and AT&T present the 2010 Calling All Innovators-North America contest
>> Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
>> $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
>> Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
>> http://p.sf.net/sfu/nokia-dev2dev
>> _______________________________________________
>> qooxdoo-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>>
>>
>
> ------------------------------------------------------------------------------
> Nokia and AT&T present the 2010 Calling All Innovators-North America contest
> Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
> $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
> Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
> http://p.sf.net/sfu/nokia-dev2dev
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel