--snip--
>>> Anyhow one thing is missing in the patch implementation (as Fabian
>>> said): The possibility to get access to the original method. So when a
>>> mixin re-implements a method, the old method should still be accessible
>>> from within the new method implementation. If a mixin patches the method
>>> doFoo we should be able to write:
>>>
>>> function doFoo(bar) {
>>> return this.__patch__orignalDoFoo.call(this,bar);
>>> }
>>>
>>> where this.__patch__originalDoFoo contains the original method.
>>>
>>> Is this possible? Do you plan to implement this functionality?
>>>
>>
>> Nothing to implement here I think. You can easily access the prototype
>> method of the original:
>>
>> return qx.original.class.prototype.doFoo.call(this, bar);
>>
>>
> Hm. Then I've not understood how the patch mixins work. If I have a
> class qx.A with a method qx.A.doFoo(bar) and I create a mixin which
> replaces doFoo, an instance of
>
> var i = new qx.A();
> i.doFoo(bar);
>
> should call the dooFoo implementation of the mixin.
>
> When the original doFoo implementation is still available by calling
> qx.A.doFoo.call(this,bar) then the "mixin process" must happen at
> instatiation time.
>
> Is this correct?
Upps, My fault. The superclass is accessible this way, but not the
original method in the same class. The method gets overwritten during
the patch/include process.
So yes, I is not that easy to get access to the old method... mhh. Maybe
you can store yourself the old reference...
Sebastian
>
>
--snip--
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel