dperez schrieb: > Hi, > > I'm reviewing in detail the new qooxdoo 0.7, and have a doubt. > > For calling the overriden function here is the old syntax: > > qx.OO.defineClass("my.cool.Class", > my.great.SuperClass, > ... > }); > > qx.Proto.foo = function(x) { > my.great.SuperClass.prototype.foo.call(this, x); > }; > > and the new one: > > qx.Class.define("my.cool.Class", { > extend : my.great.SuperClass, > ... > members : { > foo : function(x) { > this.base(arguments, x); > } > } > }); > > Clearly, the new form has more advantages. > > But how would I convert this to the new syntax?: > > qx.OO.defineClass("my.cool.Class", > my.great.SuperClass, > ... > }); > > qx.Proto.foo = function() { > this.debug('a'); > my.great.SuperClass.prototype.foo.apply(this, arguments); > }; > > I use often this construct, because if I change later the signature of a > method (adding more parameters), I don't have to update all overriden > methods, provided I'm calling the base method with unmodified parameters). >
Hello David, there is now direct equivalent to this syntax. You can still use the old version or if you don't want to reference the super class directly by name use: arguments.callee.base.apply(this, arguments); Best Fabian ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ qooxdoo-devel mailing list qooxdoo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel