> I have a structures which is a basic Key = Value pairs setup 
> which tends to follow the pattern of :
> 
> objectid1, objectid2, objectid3 etc...
> 
> however, in some instances I have more than 10 Objects in a 
> structure and they NEED to be in the correct order within 
> the structure. When it is more than 10 is does this;
> 
> objectid1, objectid10, objectid11 etc... and it does not keep 
> the correct ordering.
> 
> It is probably staring me in the face, but anyone know of a 
> good way to keep them in the order I wish? eg.
> 
> objectid1,objectid2, objectid3 ... objectid100 etc..

There is no "correct" ordering within a structure, as Ray mentioned. A
structure is like a bag. You put things in the bag, you take them out, but
you don't generally order them within the bag itself. After all, what would
a "correct" ordering be? Sequential (in order of insertion) or alphabetized
by key, or alphabetized by value?

However, in your case, you can get the ordering you want by making sure that
you use key names that follow the alphabetical order you want. Just name
your keys "objectid001", "objectid002" and so on, if you expect to have less
than one thousand keys. If you do this, you'll get the ordering you want,
although there's no guarantee that future versions of CF will return keys in
alphabetical order (and it's worth noting that not all versions of CF have
used alphabetical ordering in the past, I don't think).

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
______________________________________________________________________
Get Your Own Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation � $99/Month � Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionb
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to