[Proto-Scripty] Re: to NEW or not to NEW, that is the question

2009-08-23 Thread T.J. Crowder
Hi, > If I want to quickly develop without looking up whether I need NEW or > don't need NEW, can I just put NEW in front of everything? Surely it's better to have an idea what you're actually using, a function or a constructor? There aren't that many effects. If you use `new` inappropriately,

[Proto-Scripty] Re: to NEW or not to NEW, that is the question

2009-08-22 Thread JoJo
If I want to quickly develop without looking up whether I need NEW or don't need NEW, can I just put NEW in front of everything? Would this lead to a memory leak or does Prototype have some sort of garbage collection? On Aug 20, 2:04 am, "T.J. Crowder" wrote: > Hi, > > In general, the correct t

[Proto-Scripty] Re: to NEW or not to NEW, that is the question

2009-08-20 Thread T.J. Crowder
Hi, In general, the correct thing is what the docs[1] say it is. Fade, Appear, and most others are just functions, not constructor functions, and so "new" is not correct. Some other things, like Effect.Opacity [2] (which confusingly use *exactly* the same capitalization -- don't shoot the messe

[Proto-Scripty] Re: to NEW or not to NEW, that is the question

2009-08-20 Thread Alex McAuley
new defines an new instance of an Object / class. Some things dont need "new" and some do. It has nothing to dow tih Cross browser afaik Alex Mcauley http://www.thevacancymarket.com - Original Message - From: "Mojito" To: "Prototype & script.aculo.us" Sent: Thursday, August 20, 2009