Hi,
"Is this normal? "
Yes. calling "this.base(arguments,value);" in a mixin meand that the method
in which it is called [setValue in your case] must be present in the parent
class of "this". however, mixins can be included in any class, and setValue
cannot be present in the class hierarchy.
What you want to achieve, as far as I can guess from your post, is that you
want lots of subclasses of widgets, all of them having a parent class with
setValue [my guess is Textfields, Buttons, etc ...].
What I propose to you is to rename the setValue method in the mixin, say
"mSetValue" and code it like this:
same pseudo qx-code:
mixin1 = mixin({
mSetValue : function(value) {
this.setValue(value);
}
});
from your example it seems that mixin's setValue doesn't do anything
differently than the parent class' setValue, in which case in the
mytextfield subclass you should call setValue of the parent.
But I presume setValue method does more stuff in reality than just
"this.base(arguments,value);" .
In that case, renaming it to mSetValue sounds good anyway, as it has more
functionality than setValue.
So, all you have to do is to include mixin1 in all your subclasses and call
mSetValue if you want the mixin's method, or setValue if you want the
parent's method.
cheers,
Gabi
--
View this message in context:
http://qooxdoo.678.n2.nabble.com/mixin-methods-cannot-override-object-methods-and-use-base-methods-tp6702514p6710749.html
Sent from the qooxdoo mailing list archive at Nabble.com.
------------------------------------------------------------------------------
uberSVN's rich system and user administration capabilities and model
configuration take the hassle out of deploying and managing Subversion and
the tools developers use with it. Learn more about uberSVN and get a free
download at: http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel