>Does anyone know how to make CF provide a list of the names of Arguments in >the order provided and without using cfargument tag? > >StructKeyList/StructKeyArray returns an arbitrary order in CF8, and a >random order every time in CF7. > >Using Array functions on the Arguments scope results in a random order >every time in CF7 and CF8. > > >Run this code in CF to see the problem: > ><cffunction name="doStuff"> > <cfdump var="#Arguments#"/> > <cfdump var="#StructKeyList(Arguments)#"/> > <cfdump var="#StructKeyArray(Arguments)#"/> > <cfdump var="#ArrayToList(Arguments)#"/> ></cffunction> > ><cfset doStuff( a:'first' , b:'second' , c:'third' ) /> ><cfset doStuff( z:'first' , y:'second' , x:'third' ) /> ><cfset doStuff( a:'first' , b:'second' , x:'third' , y:'fourth' ) /> ><cfset doStuff( b:'first' , d:'second' , f:'third' ) />
You should be able to loop through the arguments array: <cfset a = arrayNew(1) /> <cfloop index="i" from="1" to="#arrayLen(arguments)#"> <cfset arrayAppend(a, arguments[1]) /> </cfloop> <cfdump var="#a#" /> -Dan ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:313141 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4