On Thu, Apr 29, 2010 at 05:21, Eduardo Robles Elvira <[email protected]>wrote:
> I've got a class (WizardStep) which inherits from
> qx.ui.container.Composite, and for convenience I've overriden the
> add() method in WizardStep to add an item to an internal form instead
> of adding item to the composite directly. But in the constructor of
> the WizardStep I want to call the original
> qx.ui.container.Composite#add function, and the only way to do it that
> I've found is:
>
> qx.ui.container.Composite.prototype.add.call(this, widget);
>
A questionably cleaner alternative is to add an extra parameter to your
overridden add method which species to call the superclass, e.g. in
WizardStep, your add method would like this:
add : function(widget, bViaSuperclass)
{
if (bViaSuperclass)
{
this.base(arguments, widget);
return;
}
// Add the widget to the local form
...
}
------------------------------------------------------------------------------
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