[Proto-Scripty] Re: Is the new statement ever needed ?

2008-12-05 Thread fero
On Dec 3, 3:19 pm, Jerod Venema [EMAIL PROTECTED] wrote: Follow the documentation. Those are classes, and do need the new. To avoid JSLint errors, simply use extra parens: (new Ajax.Request({foo:'bar'})); Thank you but I prefer to allocate a temp variable, since imo this is not too much

[Proto-Scripty] Re: Is the new statement ever needed ?

2008-12-03 Thread Alex Mcauley
not everything is a class and needs initiating with new ... you should check what does need new and what doesn't .. some effects need to be initiated as objects as they are classes and some dont Regards Alex - Original Message - From: fero [EMAIL PROTECTED] To: Prototype

[Proto-Scripty] Re: Is the new statement ever needed ?

2008-12-03 Thread Jerod Venema
Follow the documentation. Those are classes, and do need the new. To avoid JSLint errors, simply use extra parens: (new Ajax.Request({foo:'bar'})); which will make it happy. On Wed, Dec 3, 2008 at 9:03 AM, Alex Mcauley [EMAIL PROTECTED] wrote: not everything is a class and needs initiating