Joined August 2014
·

Thomas Luechtefeld

Maryland
·
·

no problem, thanks for the code. I am curious, when you create an instance of an extending class how do you make the super class initialize function fire?

Right now I just write this._super.initialize.call(this,args) in the extending classes initialize, but it would be nice if this happened implicitly.

I think that the line:

extended._super = this.prototype;

should be

extended.prototype._super = this.prototype;

The ferrari engine() method doesn't seem to work am I using this wrong?

test = new Ferrari()
child {cid: "c4", attributes: Object, _changing: false, _previousAttributes: Object, changed: Object…}
test.engine()
TypeError: Cannot read property 'engine' of undefined

Achievements
1 Karma
0 Total ProTip Views