On May 25, 2006, at 9:33 PM, Will wrote:
> I've been using Mochikit for some time to do simple stuff, but I am > now > trying to work it into my prototypes (small p)/classes, but the I am > having some trouble with what "this" references, and it also seems > like > there are a whole bunch of tools to make building classes easier, > but I > am definitely lost. So I was wondering, rather than trouble you with > some little example, maybe I can read up on suggested ways of building > classes using Mochikit. Is there some documenation on this for > mid-advance js writers? I'm looking for a good starting point. MochiKit doesn't really provide any specific way to create constructors, as it really doesn't use them much internally. The pattern used internally is to define the constructor, then do an update() on the prototype to add methods. As for "this" troubles, you'll want to take a look at bind, method, and bindMethods. You should also read up on JavaScript so that you understand how and why it's doing what it does. I've written up a bit on that particular issue here: http://tinyurl.com/ak5xs -bob --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "MochiKit" 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/mochikit -~----------~----~----~----~------~----~------~--~---
