Re: [Proto-Scripty] Re: Custom signal

2009-12-07 Thread Alex McAuley
the global variable arguments will give u an array of arguments... https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Function/arguments Alex Mcauley http://www.thevacancymarket.com - Original Message - From: fma f...@gbiloba.org To: Prototype

Re: [Proto-Scripty] Re: Custom signal

2009-12-07 Thread Alex McAuley
arguments is global... consider this ... function foo('one','two','three') { alert(arguments[0]); // one alert(arguments[1]); // two alert(arguments[2]); // three } Alex Mcauley http://www.thevacancymarket.com - Original Message - From: fma f...@gbiloba.org To: Prototype

Re: [Proto-Scripty] Re: Custom signal

2009-12-07 Thread Frédéric
Le lundi 7 décembre 2009 12:46, T.J. Crowder a écrit : Worth reading up on the `arguments` variable in the spec[1] (warning, multi-meg PDF). Also check out Function#apply, which is probably what you're looking for: It works fine! Here is the code I now use: var Signal = Class.create({

Re: [Proto-Scripty] Re: Custom signal

2009-12-07 Thread Frédéric
On lundi 07 décembre 2009, Tobie Langel wrote: A couple suggestions: https://gist.github.com/bb3d40f6915118da4dec Thanks! You suggested to use: a = [] instead of: a = new Array() What is the difference? PS: about the try/catch, in my real code, I log the error on Firebug