The doc is talking about the changes to StructKeyList. In CF5, the list
was sorted. In MX, it's the order you enter them.

<cfset test = structNew()>
<cfset test.b = 1>
<cfset test.a = 1>
<cfoutput>#structKeyList(test)#</cfoutput>

In CFMX, this returns b,a - in CF5, it returns a,b.

=======================================================================
Raymond Camden, ColdFusion Jedi Master for Hire

Email    : [EMAIL PROTECTED]
Yahoo IM : cfjedimaster

"My ally is the Force, and a powerful ally it is." - Yoda 

> -----Original Message-----
> From: Sean Daniels [mailto:[EMAIL PROTECTED]] 
> Sent: Wednesday, September 18, 2002 3:31 PM
> To: CF-Talk
> Subject: CFMX Structure Sorting
> 
> 
> OK, so I've read the livedocs explaining the changes to the way 
> structures behave in MX, but I'm not finding it to be the case... 
> here's what the docs say:
> 
> "ColdFusion MX returns struct keys in the order that you create them. 
> ColdFusion�5 returns struct keys in alphabetical order. If you need 
> sorted struct values or keys, use the StructSort() and 
> StructKeySort() 
> functions."
> 
> I have the following code to create a structure for navigation:
> 
> <cfscript>
>       opts = structnew();
>       opts[0]=structnew();
>       opts[0]["fa"]="foo";
>       opts[0]["lab"]="Option A";
>       opts[0]["dsc"]="My Description.";
>       opts[1]=structnew();
>       opts[1]["fa"]="foo";
>       opts[1]["lab"]="Editor";
>       opts[1]["dsc"]="Add, edit, and delete.";
>       opts[2]=structnew();
>       opts[2]["fa"]="enewsmailings.main";
>       opts[2]["lab"]="Creator";
>       opts[2]["dsc"]="Tools for creating things.";
> </cfscript>
> 
______________________________________________________________________
Get the mailserver that powers this list at http://www.coolfusion.com
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