On 9/12/06, Sébastien Gruhier <[EMAIL PROTECTED]> wrote: > > Hi > > 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 > Seb
In Prototype.js, pseudo-inheritance is implemented by copying properties of one class to another. This isn't really inheritance like you are thinking and there is no chain of classes for method lookup when a call like foo.bar() is made. If you want class-based inheritance like Ruby or Java then have a look at this tutorial. http://kevlindev.com/tutorials/javascript/inheritance/index.htm This is the single best JavaScript tutorial I have read. Yahoo! uses this technique in their JavaScript library. Peter --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
