I am working on a control collection for _javascript_/Ajax.Net. I am stuck on the class inheritance aspects of the prototype library. If someone could point me to an example it would be a great help. I have looked through the controls.js of the scriptaculous library and found something like the below code, but everytime I ran it I would get a constructor error.
Thanks for any help;
Looking for something like:
MyControls.TextBox = Class.create();
MyControls.TextBox.prototype =
{
baseInitialize: function(loadCallback, saveCallback, saveOptions)
{
this.loadCallback = loadCallback;
this.saveCallback = saveCallback;
....
},
Save: function()
{
//do save operation using options
}
};
MyControls.EditableTextBox = Class.create();
Object.extend(MyControls.EditableTextBox.prototype , MyControls.TextBox.prototype),
{
initialize: function(targetObj, loadCallback, saveCallBack, options)
{
this.baseInitialize(loadCallback, saveCallback);
},
Update: function()
{
this.Save();
}
}
_______________________________________________ Rails-spinoffs mailing list [email protected] http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
