(Forgot to reply all) > -----Original Message----- > From: mochikit@googlegroups.com [mailto:[EMAIL PROTECTED] On > Behalf Of [EMAIL PROTECTED] > Sent: Friday, November 03, 2006 12:52 PM > To: MochiKit > Subject: [mochikit] Visual: When to use 'new' and when not to? > > > Hello all, > > I'm trying out MochiKit.Visual, and ran across an issue. I was trying > to use Highlight() and it just wasn't working (errors about __init__ > not being defined). I eventually figured out that I had to do: > > new Highlight(src); > > But I've been able to use other visual effects (puff, fade. several > others) without explicitly using 'new'. Is this just a temporary > inconstancy in the API, a bug in Firefox (1.5) or something that I'm > missing in the documentation?
It is subtle, but anything in the documentation that is PascalCased is a class, and thus needs to be instantiated, anything camelCased is a function and you can simply use it. This gets people all the time, myself included. I can't speculate as to the reasons for all of this and will defer that to someone that knows. Jason Bunting -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.409 / Virus Database: 268.13.24/514 - Release Date: 11/2/2006 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "MochiKit" group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit?hl=en -~----------~----~----~----~------~----~------~--~---