Re: [Rails-spinoffs] [OT] Of the good use of var

2006-07-04 Thread Alexander Presber
For the scoping issue you might want to read this: http://www.iamcal.com/publish/articles/js/scoping/ Cheers, Alex Am 04.07.2006 um 17:44 schrieb Nicolas Terray: On 7/4/06, Alexander Presber <[EMAIL PROTECTED]> wrote: It is interesting you could build anything "huge" without

Re: [Rails-spinoffs] [OT] Of the good use of var

2006-07-04 Thread Alexander Presber
It is interesting you could build anything "huge" without knowing the var declaration. It declares the scope of the variable to be in the current function (or global, if you are not in a function definition). Any reference to a variable inside of a function,, that was NOT declared local to

[Rails-spinoffs] Sortable trouble

2006-03-07 Thread Alexander Presber
their wrong offset ever after. Since I kept close to the original two-Sortable demo from the webside, I can only assume, this is a bug or unthought-of case in the scriptaculous lib. It happens on IE, Mozilla and Safari. Any comments are high

[Rails-spinoffs] Re: prototype.js: enumerable mixin for hash broken

2006-01-23 Thread Alexander Presber
s support an each method and want to get rid of some elements (using a function to determine which)? reject should do just that, shouldn't it? Sincerely yours Alexander Presber Why not just do... var b = $H(a.reject(function(val){ return (val[1]==1) })); ? The reject method returning an

[Rails-spinoffs] prototype.js: enumerable mixin for hash broken

2006-01-23 Thread Alexander Presber
functions for the Enumerable mixin, so that the would be an _addElement() method for all Classes, that wish to mixin Enumerable and the reject method (as other Enumerable methods) would call that as opposed to always creating an Array internally. Any ideas or comments? Sincerely you