I was wondering the point of this line when inheriting objects:

MyObject.prototype = new DynObject();

Wouldn't it be better to say:
MyObject.prototype = DynObject.prototype

Because in your MyObject constructor you will be saying:
 this.DynObject = DynObject;
 this.DynObject();
 
so all of the properties in the DynObject constructor will be
initialized, and the MyObject.prototype = DynObject.prototype line
will set all of the methods equal to the MyObject. Using the first
method you are always calling the constructor an extra time that is
not needed (or is it?).

-- 
// Robert Rainwater


_______________________________________________
Dynapi-Dev mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/mailman/listinfo/dynapi-dev

Reply via email to