Re: Struct Sort

2003-01-29 Thread Christian Cantrell
, "2", ""); > structInsert(s, "1", ""); > > #structKeyList(s)# > > > >> -Original Message- >> From: Dave Carabetta [mailto:[EMAIL PROTECTED]] >> Sent: Wednesday, January 29, 2003 2:05 PM >

RE: Struct Sort

2003-01-29 Thread Barney Boisvert
TECTED]] > Sent: Wednesday, January 29, 2003 2:05 PM > To: CF-Talk > Subject: RE: Struct Sort > > > >Where does it say that struct keys are returned in insertion order? The > >docs for structKeyList() and structKeyArray() say they are unordered. > > In the LiveDocs

RE: Struct Sort

2003-01-29 Thread Dave Carabetta
>Where does it say that struct keys are returned in insertion order? The >docs for structKeyList() and structKeyArray() say they are unordered. In the LiveDocs on MM's site under Migrate ColdFusion 5 Applications, if you scroll to the very bottom, you'll see that StructKeyList() now returns the

RE: Struct Sort

2003-01-29 Thread Barney Boisvert
To: CF-Talk > Subject: RE: Struct Sort > > > >The reason there is no rhyme or reason is because structs are > implemented > >as > >HashMaps in CFMX, which by definition don't have an order to the > values. I > >would imagine that you'll get them back i

RE: Struct Sort

2003-01-29 Thread Dave Carabetta
>The reason there is no rhyme or reason is because structs are implemented >as >HashMaps in CFMX, which by definition don't have an order to the values. I >would imagine that you'll get them back in hashCode() order, but that's not >guarenteed consistent because of collision resolution. Accordin

RE: Struct Sort

2003-01-29 Thread Barney Boisvert
Probably was still a HashMap, but with a different implementation of the getKeyList() method that sorted the key list first. Nothing you can't solve with listSort() though. > -Original Message- > From: Sean Daniels [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, January 29,

RE: Struct Sort

2003-01-29 Thread Raymond Camden
> > I'm guessing you are running MX in production, but not in dev. The > ordering of structs changed from 5.0 to MX. There seems to be > no rhyme > or reason to the output order in MX. Fun. The order of the keys returned by a struct was never promised - it just happened to return in alpha orde

Re: Struct Sort

2003-01-29 Thread Sean Daniels
On Wednesday, January 29, 2003, at 03:13 PM, Brad Roberts wrote: > I've got a structure that holds several questions: > > temp = structNew(); > temp.A = "a quesiton"; > temp.B = "another question"; > temp.C = "yet another question"; > ... and so on > > I'm outputing the questions like s

RE: Struct Sort

2003-01-29 Thread Raymond Camden
s the Force, and a powerful ally it is." - Yoda > -Original Message- > From: Brad Roberts [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, January 29, 2003 2:13 PM > To: CF-Talk > Subject: Struct Sort > > > I've got a structure that holds several questions

Struct Sort

2003-01-29 Thread Brad Roberts
I've got a structure that holds several questions: temp = structNew(); temp.A = "a quesiton"; temp.B = "another question"; temp.C = "yet another question"; ... and so on I'm outputing the questions like so: #temp[q]#: For some reason, the questions won't stay in order on th