I agree with both his thoughts, and your thoughts but I think the correct choice would be to start the array counting with 0 as this is a JAVASCRIPT plugin. So that would be my suggestion. Change the code to work well with javascript.
-----Original Message----- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Christopher Jordan Sent: Tuesday, May 01, 2007 10:48 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: CFJS plugin Andy, It appears that Randy Anderson (LeftCorner.com) chose to start his Arrays at index 1 instead of 0. I can see the logic behind it: wanting to keep things behaving as much like ColdFusion as possible. However, I disagree with this choice. I'd rather each language deal with arrays the way they were designed. When sending JSON encoded data back from ColdFusion, arrays are converted from "1 based" to "0 based". I think this is the right thing to do... but folks are welcome to disagree. :o) I'll be looking through the rest of the functions to see that they are also returning arrays whose indexes start with zero. Cheers, Chris Andy Matthews wrote: > I don't know if the array "bug" is a bug or a feature. Coldfusion > actually starts counting arrays at 1. So it's possible that could be > intentional, although given that this is a javascript plugin, it's probably a bug. > > -----Original Message----- > From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] > On Behalf Of Ariel Jakobovits > Sent: Tuesday, May 01, 2007 2:04 AM > To: jquery-en@googlegroups.com > Subject: [jQuery] CFJS plugin > > > Hi Chris, > > nice plugin. great idea. very useful. 2 things: > > 1) the packed version doesn't seem to load properly. something about a > comma. > > 2) your ListToArray function starts adding to the array at index 1, not 0. > > thanks for the plugin, i really like it. > > -Ariel > > > > -- http://cjordan.info