Yes, this is a way to go:

var A = q.define({members : {a: function() {alert("a");}}});
var B = q.define({
  extend: A, 
  members : {
    a : function() {
      this.constructor.base.prototype.a.call(this, arguments);
      alert("b");
    }
  }
});

var b = new B();
b.a();



Am 26.09.2012 um 22:02 schrieb Loren Schlomer <[email protected]>:

> I guess this works:
> 
> this.constructor.base.prototype.overriddenMethod(arguments, ...)
> 
> 
> 
> On Wed, Sep 26, 2012 at 12:41 PM, Loren Schlomer
> <[email protected]> wrote:
>> One more question regarding q.define().
>> 
>> Is it possible to invoke an overridden method in a super class?
>> this.base(arguments, ...) appears not to work.
>> 
>> 
>> 
>> 
>> 
>> On Sun, Sep 23, 2012 at 11:25 PM, Martin Wittemann
>> <[email protected]> wrote:
>>> Hey,
>>>> ....does not work and emits the behavior described....And of course,
>>>> properties aren't supported with qx.Bootstrap.....
>>>> 
>>> Thats right. :)
>>> 
>>>> Slight overstep on my part, so indeed I was reading the docs incorrectly.
>>> Still, we need to enhance the docs about the define method. There are not 
>>> enough samples and text to give a clear picture.
>>> 
>>>> Should also note, you MUST have a members{} block defined (it can be
>>>> empty...) for q.define() to return a function prototype.  Without it,
>>>> it returns the object I described yesterday.   So a combination of
>>>> trying to use properties AND omitting members{} is what led to the
>>>> confusion.
>>> 
>>> Sure, otherwise its defined as a static class and this does not need to be 
>>> a function.
>>> 
>>> Regards,
>>> Martin
>>> 
>>> 
>>> 
>>> ------------------------------------------------------------------------------
>>> Live Security Virtual Conference
>>> Exclusive live event will cover all the ways today's security and
>>> threat landscape has changed and how IT managers can respond. Discussions
>>> will include endpoint security, mobile security and the latest in malware
>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>>> _______________________________________________
>>> qooxdoo-devel mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
> 
> ------------------------------------------------------------------------------
> How fast is your code?
> 3 out of 4 devs don\\\'t know how their code performs in production.
> Find out how slow your code is with AppDynamics Lite.
> http://ad.doubleclick.net/clk;262219672;13503038;z?
> http://info.appdynamics.com/FreeJavaPerformanceDownload.html
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://ad.doubleclick.net/clk;258768047;13503038;j?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to