"IIRC, this isn't the way to do it in v8" I don't want to force users to do it the V8 way, I want them to do it the JavaScript way.
You write in your derived constructor: function MyPanel() { var argv = Array.prototype.slice.apply(arguments,[0]); this.prototype = this.__proto__ = new ncurses.NCPanel(argv); // ... return this; } What is the property this.prototype? In the constructor, isn't "this" the instance, then it has no "prototype" property, that is on the constructor (function). I don't see why I should use the "__proto__" property to change the prototype chain after the instance was created, the prototype chain has already been specified. On Mar 17, 11:38 am, Stephan Beal <sgb...@googlemail.com> wrote: > On Wed, Mar 17, 2010 at 2:44 AM, Henrik Lindqvist < > > henrik.lindqv...@gmail.com> wrote: > > "Derived2.prototype = new Base; \n" > > "Derived2.prototype.constructor = Derived2; \n" > > IIRC, this isn't the way to do it in v8. i remember going through similar > pain when i wrote my ncurses wrappper for v8, and now i find that i > documented it: > > http://code.google.com/p/v8-juice/wiki/PluginNCurses > > see the section called "Inheritance...", near the end of the table of > contents. > > i hope that helps. > > -- > ----- stephan bealhttp://wanderinghorse.net/home/stephan/ -- v8-users mailing list v8-users@googlegroups.com http://groups.google.com/group/v8-users