Hi everyone, I'm practicing on an example from chapter 8 of Practical Prototype and Script.aculo.us. The code wants to add an instance method to the Quarterback class. It uses Class.extend to add a method in the Quarterback, but I didn't get it work as the error in my first post. After referenced the pages from above links I get it work by using the addMethods.
Thank you all. Tim On Jan 11, 1:03 pm, Tobie Langel <tobie.lan...@gmail.com> wrote: > The proper syntax is Class.create. Not Class.extend nor new Class. > > For more info, see: > > http://prototypejs.org/api/class/create > > and > > http://prototypejs.org/learn/class-inheritance > > Best, > > Tobie > > On Jan 11, 5:52 pm, Yanick <yanick.roc...@gmail.com> wrote: > > > > > The old Class.extend was replaced by : var cls = new Class(baseClass, > > { ... }); > > > On Jan 10, 9:30 pm, Tim Woo <tim.b...@gmail.com> wrote: > > > > Hi, > > > > I just started looking at the Prototype. But I've got Class.extend is > > > not a function when I practiced on it. I double checked and the > > > prototype.js was included in the html file. > > > I googled it but none complained about it and I must get something > > > wrong with it. Can anyone give me some hints of what's going on for > > > Cless.extend? > > > > Thnaks,- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype: Core" group. To post to this group, send email to prototype-core@googlegroups.com To unsubscribe from this group, send email to prototype-core-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-core?hl=en -~----------~----~----~----~------~----~------~--~---