I''m working with prototype.js to make some widgets, and trying to
figure out working with extend.
I''d like to be able to to extend a class and then call a function from
the super class.
var SuperClass = Class.create();
SuperClass.prototype = {
initialize: function(somevar){
this.somevar = somevar;
}
}
var SubClass = Class.create();
SubClass.prototype = (new SuperClass()).extend({
initialize: function(somevar, anothervar){
super.initialize(somevar); //extend super class'' function here
this.anothervar = anothervar;
}
});
--
Ryan P. Miller
ryan@numinalabs.com