On Thursday April 29 2010 08:48:51 el_migu_el wrote:
> I have a customized SelectBox, which needs a different arrow in preselected
> state.
> As using the following in source build works fine it throws an error when
> using the builded qooxdoo app.
> 
> In the SelectBox Composite Parent I register a listener for
> changeDecorator: this.addListener( "changeDecorator",
> this.__preselectAction, this );
> 
> this.__preselectAction looks as follows:
> __preselectAction: function(e) {
>         if( this.hasState( "firstcurrent" ) ) {
>                 this.__combo.addState("preselected");
>                 this.__combo.__childControls.arrow.addState("preselected");
>                               } else {
>                 this.__combo.removeState("preselected");
>                 this.__combo.__childControls.arrow.removeState("preselected
> ");                           }
> }
> 
> The Error in Firebug Console (only when using builded qooxdoo app):
> this.__oX.__childControls is undefined
> [Break on this error] this.__oX.__childControls.arrow.addState(m); 
> 
> Can anyone help?
The issue you encounter is an optimizations step which is shortening the 
private variables. So you cannot rely on calling the private variable in the 
"build" version (the "source" does not use the optimization).
Instead you should use public API to get the desired child control. In this 
case you shoud go for the "getChildControl" method which is part of every 
widget in qooxdoo.

> Yes, I'am new to qooxdoo :)
Welcome to the project!

cheers,
  Alex

------------------------------------------------------------------------------
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to