On Jul 28, 8:53 pm, Stephan Beal <[email protected]> wrote:
> i know this topic has been talked about more than enough times, but i
> recently took another look at it and i think i've found an approach to
...

But there's a catch (i just discovered):

With this approach, for OVERRIDDEN member funcs to work properly, they
must be defined AFTER calling extendClass(), because
ChildClass.prototype is overwritten by extendClass().

So, proper usage is (apparently):

function MyClass()
{
    var av = Array.prototype.slice.apply(arguments,[0]);
    arguments.callee._superConstructor_.call( this, av );
...
};
extendClass( MyClass, MyInterface );/* must go right after the ctor!
*/

MyClass.prototype.overriddenFunc = function(){...};


--~--~---------~--~----~------------~-------~--~----~
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to