I'm having this strange case. here is an example in some sort of qx-like
language:

mixin1 = mixin({

   setValue : function(value) {
      this.base(arguments,value);
   }

});

mytextfield = class({

   extend textfield,
   include mixin1

});

as you can see, mixin1 is overriding a method of the class mytextfield.
the method setValue is part of class textfield, so it's inherited by
mytextfield.
the error message says that setValue does not derive from
textfield.prototype.setValue.

If you copy the overriding method in the body of the class, it works fine!
See this:

mytextfield = class({

   extend textfield,

   setValue : function(value) {
      this.base(arguments,value);
   }

});

Is this normal?
Maybe there is a design reason for this, but I can't find it.
In my case, I have to copy the overriding method in all clases, that
complicates the code maintenance (because no reuse at all, and open a source
of typo errors when modififing each copy of the code).

Regards,
Herman







-----
la vida es una incesante cadena de oportunidades para aprender y triunfar.
life is an endless chain of opportunities to learn and succeed.

lo más importante: ser selectivo, responsable y perseverante.
the most importantly: to be selective, responsible and persevering.
--
View this message in context: 
http://qooxdoo.678.n2.nabble.com/mixin-methods-cannot-override-object-methods-and-use-base-methods-tp6702514p6702514.html
Sent from the qooxdoo mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to