On 06/08/2010 11:22 AM, Fink, Andreas wrote:
> Hi,
> 
> Is it possible to add resources to the ResourceManager while runtime?
> We use a xml description to create widgets in the frontend. If I, for
> example, create a Button with a icon of the framework or a custom icon
> that's in the resource path, it works but if another developer tries to
> use a icon, copied to the resource path after compiling, the icon is not
> shown.
> My idea is to check if a resource is already known, if not, it's added
> dynamically. Of course this new resource will then only be available for
> the applications lifetime.
> 
> Or is there a better way of using icons, copied to the resource path,
> after the application is build?

For one thing, you can always use images that are *not* known at compile
time. I did some test with a vanilla skeleton in the build version and
that seemed to work. Of course, the image, if it is used with a
"resource id" in the code, has to be in the proper path of the build
version (resource/<namespace>/...). The only thing noticeable would be a
warning in the source version like "Using unmanaged image...", and maybe
a less-than-instant rendering of the new image. That's all. Please
verify this. If the problem persists, please open a bug report with
sample code to reproduce it.

Otherwise, there is currently no API to register images during run time
with the ResourceManager, but this might be a good enhancement. If you
load images dynamically with the qx.io.ImageLoader that should work
smoothly, as the ImageLoader also maintains some info about the loaded
images.

HTH,
T.

> 
> 
> Regards,
> Andreas
> 
> ------------------------------------------------------------------------------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate 
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
> lucky parental unit.  See the prize list and enter to win: 
> http://p.sf.net/sfu/thinkgeek-promo
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
> 
> 

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to