> Is there a way to extend a class and to overide a method and, in this
> method, to call the parent function as it is done in mootools?
> Thanks
Well, a hackish way is to do this:
newClass.prototype.oldMethod = oldClass.prototype.method;
newClass.prototype.method = function (args) {
this.oldMethod(args);
// do some other stuff
};
Replace the word 'method' with your method name, etc, etc.
There's probably a better way, but that's how I've done it in a hurry
before.
Greg
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs
-~----------~----~----~----~------~----~------~--~---