I'm experiencing issues with the ImageManager.defineAlias method. I'm
fairly convinced it's a bug and I'd be happy to patch but I can't
quite understand the intent of the code.

The storage of Qooxdoo on my webserver is not in a standard location
and cannot be for various reasons. Based on some posts to this list, I
 attempted to define icon and widget aliases for the ImageManager
using the defineAlias method. After enabling some commented debugging
code in ImageManager, it seems that the defineAlias method is working
as expected.

Unfortunately, my application level settings are being overwritten by
 the standard theme classes when they load. The call stack looks
something similar to this:

CrystalSvgIconTheme.ctor()
IconTheme.ctor()
IconTheme._register()
ImageManager.registerIconTheme()
ImageManager.setIconTheme()
ImageManager._modifyIconTheme()
ImageManager.defineAlias()

(Note that the Qooxdoo property idioms make following the call stack
to _modifyIconTheme difficult, I can't just grep for calls to this
method, I have to understand that it's invoked as a side-effect to
setIconTheme()).

My application establishes it's aliases after qx.js is loaded but
before I use any of the widgets. It appears that the theme instance is
loaded on demand so each time an IconTheme is loaded (when I create my
first atom), my application-defined aliases are ultimately restored
back to the default of ../../resources/[icon|widget]. The enabled
debug logging in defineAlias then looks like this:

000391 DEBUG: qx.manager.object.ImageManager(29): defineAlias: static
=> /qooxdoo/resource/static
000391 DEBUG: qx.manager.object.ImageManager(29): defineAlias: widget
=> /qooxdoo/resource/widget
000391 DEBUG: qx.manager.object.ImageManager(29): defineAlias: icon =>
/qooxdoo/resource/icon/crystalsvg
000438 DEBUG: qx.manager.object.ImageManager(29): defineAlias: icon =>
../../resources/icon/crystalsvg
000438 DEBUG: qx.manager.object.ImageManager(29): defineAlias: widget
=> ../../resources/widget/windows

My code is responsible for lines 1-3, Qooxdoo internally does 4 & 5
overwriting my settings.

My question is, why does _modifyIconTheme call defineAlias? It seems
to me that defineAlias is a separate concern from registering and icon
theme and that the two should not be connected. Even if they are
connected, IMO Qooxdoo should never override an application-level
defined setting as happens in this case and should honor the app
setting (i.e., not redefine the alias if it exists). If I'm on the
right track here, just say so and I think I can run with a patch.

-erik

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to