[Rails-spinoffs] selectable class

2006-09-22 Thread Daniel Herrero
Hello everybody,I have created a script for selecting elements in a window's desktop way based on the dragdrop library from scriptaculous. I have only tried it with firefox so I don´t know if it works with other browser. It has Ctrl key functionality and more.Please try it.

[Rails-spinoffs] Enumerable.inGroupsOf() should fill up with undefined instead of null?

2006-09-22 Thread Martin Bialasinski
Hi, I cannot add comments to the bugtracker, it seems, so here we go: There is this new method for Enumerables: [1,2,3,4,5].inGroupsOf(3) - [[1,2,3],[4,5,null]] To me, null is something explicitly set by the user / developer to no value, not applicable, whereas undefined means this

[Rails-spinoffs] Re: Enumerable.inGroupsOf() should fill up with undefined instead of null?

2006-09-22 Thread Martin Bialasinski
On 9/22/06, Christophe Porteneuve aka TDD [EMAIL PROTECTED] wrote: I do believe the latter values ARE undefined. What you *see* in the text representation is a result of a pending bug in Object.inspect, that displays undefined's as null's. They are null alright: inGroupsOf:

[Rails-spinoffs] Re: selectable class

2006-09-22 Thread Ryan Gahl
Very nice Daniel! Will that work applied to arbitrary elements? On 9/22/06, Daniel Herrero [EMAIL PROTECTED] wrote:Hello everybody,I have created a script for selecting elements in a window's desktop way based on the dragdrop library from scriptaculous. I have only tried it with firefox so I

[Rails-spinoffs] Re: Drop Zone Indicator with Scriptaculous

2006-09-22 Thread Peter Michaux
On 9/22/06, Thomas Fuchs [EMAIL PROTECTED] wrote: Am 20.09.2006 um 20:00 schrieb Peter Michaux: I'm curious why there is a lack of interest in removing navigator.userAgent from Scriptaculous. Is it because Scriptaculous developers do not understand how unreliable this technique is?

[Rails-spinoffs] Re: Enumerable.inGroupsOf() should fill up with undefined instead of null?

2006-09-22 Thread Martin Bialasinski
On 9/22/06, Thomas Fuchs [EMAIL PROTECTED] wrote: hmm-- i've modelled it after the rails ruby extension[1]. Which uses nil. Note that the german version of the article is much clearer and mentions the synonymity of null and nil explicitly. I believe the english version has some good

[Rails-spinoffs] Help with escapeHTML

2006-09-22 Thread Chris Lear
Hi, I've got some code that takes what a user writes in a text area, and puts it into an html tag on the page. I want to display line breaks as they are entered, but I don't want to use white-space:pre, and white-space:pre-line doesn't seem to be supported (or isn't what I thought it was). So I

[Rails-spinoffs] Re: selectable class

2006-09-22 Thread Ken Snyder
This is absolutely marvelous!  This looks like a great addition to my library.  I would sure vote for its inclusion in a future Scriptaculous release! Well Done! --Ken From: rubyonrails-spinoffs@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Daniel Herrero Sent:

[Rails-spinoffs] Re: Enumerable.inGroupsOf() should fill up with undefined instead of null?

2006-09-22 Thread Ryan Gahl
null is a value directly assignable to a variable. undefined is a string represntation of a _javascript_ type.var foo;alert(foo == null); // truealert(typeof (foo) == undefined) // true It makes much more sense, IMHO, for them to be null, since they were unsupplied. Otherwise you are creating new

[Rails-spinoffs] Re: Enumerable.inGroupsOf() should fill up with undefined instead of null?

2006-09-22 Thread Ryan Gahl
Of cause, you can do arr[3] = undefined;, but still: choosing betweennull and undefined, undefined seems to carry the meaning better than null.No, you can't. You can do arr[3] = undefined (string assignment), but not without the quotes as undefined is, well, undefined. On 9/22/06, Martin

[Rails-spinoffs] Re: Help with escapeHTML

2006-09-22 Thread Ryan Gahl
Maybe switch the order of operations?DOMElement.innerHTML = text.replace(/\n/g,br/).escapeHTML();...or would that be worse? Just a thought.On 9/22/06, Chris Lear [EMAIL PROTECTED] wrote: Hi,I've got some code that takes what a user writes in a text area, andputs it into an html tag on the page. I

[Rails-spinoffs] Dynamic Stylesheet switching

2006-09-22 Thread Sam
My layout is all setup to allow design-time switching of stylesheets. Is there a prototypeish add-in or method that supports dynamic stylesheet switching? Sam --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby

[Rails-spinoffs] Re: Enumerable.inGroupsOf() should fill up with undefined instead of null?

2006-09-22 Thread Ryan Gahl
In that case why not make your JSON output represent the sql NULLs as an enumeration or other mapping to the corresponding server side null representation.For example, if my server side code were C# I would make the JSON objects equal to something like the following: foo = SqlInt32.Null;On

[Rails-spinoffs] Foreign JavaScript

2006-09-22 Thread Nathaniel Brown
I am interested in finding out what this actually does? if (result = !!(iterator || Prototype.K)(value, index)) I seen this function in the Prototype library and haven't been able to find any documentation to gain insight into what the line above does. any: function(iterator) { var