Helma Logo
main list history
previous version  overview  next version

Version 4 by Lehni on 05. September 2006, 08:56

*This post|http://helma.org/pipermail/helma-dev/2006-July/002941.html* about Dean Edward's *Base Class for JavaScript Inheritance|http://dean.edwards.name/weblog/2006/03/base/* started the discussion about JavaScript OOP in Helma.

Hannes came up with *his own impementation|JavaScript Inheritance Sugar*, and in parallel, without realizing this, I was following the discussion on Dean's page and found *Ben Newman's implementation|http://seraph.im/* for Prototype, which looked very clean and which I used as a base for my own improvements:improvements (described in *this post|http://helma.org/pipermail/helma-dev/2006-August/003057.html*):

* The use of this.$super() instead of this.sup() (Hannes named it the same, and this is a pure coincidence)
* Code that checks if $super is actually in use, and only wraps the function if it does use $super.
* The addition of Class.inject, that allows modifaction the modification of the class at runtime (adding of new methods and overriding existing ones by hineriting inheriting from itself).