I haven't tried this, but you might be able to get it working via .call 
or .apply

== cut ==
add: function(child, options) {
    this.__content.add(child, options);
},
__containerAdd: function(child, options) {
    this.baseClass.add.call(this, child, options);
}
== cut ==

As I said I haven't tested it but I think that should work.

Or looking at the code perhaps this:

__containerAdd: function(child, options) {
    this.add.base.call(this, child, options);
}

Hope that helps,
Matt

Sebastian Fastner wrote:
> Hi,
> 
> is there any easy way to access member methods of the base class? I like 
> to write a new add-Function that does other things than the base add 
> class, but on the other hand I still need access to the base add function.
> 
> == cut ==
> add: function(child, options, toBase) {
>    if (toBase) {
>      this.base(arguments, child, options);
>    } else {
>      this.__content.add(child, options);
>    }
> }
> == cut ==
> 
> The above source shows an extended Composite class and the way I do it 
> now, but I think it's no beauty solution :)
> If I use the add method like an composite add method (with 2 arguments) 
> the new add method is called, otherwise the old method that should be 
> accessible is called if I call it with 3 arguments (third parameter is 
> true).
> 
> I like to have something like
> == cut ==
> add: function(child, options) {
>    this.__content.add(child, options);
> },
> __containerAdd: function(child, options) {
>    this.baseClass.add(child, options);
> }
> == cut ==
> 
> The art of writing software :)
> 
> Thanx,
> Sebastian


------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to