I don't understand why the following should not work

function parent()
{
}

parent.prototype.show = function()
{
    print("parent showing\n");
}

var p = new parent();
p.show();

function child()
{
}

// This works
//child.prototype = p;
//var c = new child();
//c.show();

var c = new child();
c.prototype = p;
c.show();

-- 
Anthony Shipman                    Mamas don't let your babies 
[EMAIL PROTECTED]                   grow up to be outsourced.

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

Reply via email to