Yes, this is exactly as I said. The 'one' argument is undefined because it has not been passed to the function - that is clear enough. I also said that I wasn't 100% sure why the '1' argument was undefined but that I suspect that ColdFusion knows it is an unnamed argument even though it has assigned it with a number as its key. This may be a bug or intentional behaviour.
A little testing reveals why: <cffunction name="testMe" output="1"> <cfset var args = StructNew()> <cfset var arg = ""> <cfloop collection="#arguments#" item="arg"> <cfset args[arg] = Duplicate(arguments[arg])> </cfloop> <cfdump var="#args#"> <cfset testMe2(argumentCollection = args)> </cffunction> This should product the same results as you are getting now. If you change the name's slightly however, it will work: <cfloop collection="#arguments#" item="arg"> <cfset args['a' & arg] = arguments[arg]> </cfloop> The reason it is failing is that '1' is an invalid named argument name (even though CF assigns it to unnamed variables). Looping through the unnamed arguments and prepending 'a' to them in a new struct and then passing that as the argument collection should solve your problem. You could even make sure you only rename unnamed arguments so: <cffunction name="testMe" output="1"> <cfset var args = StructNew()> <cfset var arg = ""> <cfloop collection="#arguments#" item="arg"> <cfif IsNumeric(arg)> <cfset args['a' & arg] = arguments[arg]> </cfif> </cfloop> <cfdump var="#arguments#"> <cfset testMe2(argumentCollection = args)> </cffunction> You most likely still have a problem though, 'one' is still undefined because no argument named 'one' has been passed to the second function. Dominic On 21/04/2008, Leitch, Oblio <[EMAIL PROTECTED]> wrote: > > Actually, they *are* technically named; the keys in the structure are > numeric. You can't evaluate 'struct.1', but you _can_ evaluate > 'struct["1"]'. > > Further, what I'm saying is you *can* pass arguments through using an > argumentCollection attribute. What you *can't* do is name the arguments > in the receiving function if they are unnamed when passed through. This > is not true when the data is sent directly. > > Here are the test samples: > > > This works; each dump shows a struct with a key "one", containing the > original string: > <cffunction name="testMe2" output="1"> > <cfargument name="one"> > <cfdump var="#arguments#" label="testMe 2" output="browser" /> > </cffunction> > > <cffunction name="testMe" output="1"> > <cfargument name="one"> > <cfdump var="#arguments#" label="testMe" output="browser" /> > <cfinvoke method="testMe2" argumentcollection="#arguments#" /> > </cffunction> > > > > This works; each dump shows a struct with a key "1", containing the > original string: > <cffunction name="testMe2" output="1"> > <cfdump var="#arguments#" label="testMe 2" output="browser" /> > </cffunction> > > <cffunction name="testMe" output="1"> > <cfdump var="#arguments#" label="testMe" output="browser" /> > <cfinvoke method="testMe2" argumentcollection="#arguments#" /> > </cffunction> > > > > This works; each dump shows a struct with a key "one", containing the > original string: > <cffunction name="testMe2" output="1"> > <cfdump var="#arguments#" label="testMe 2" output="browser" /> > </cffunction> > > <cffunction name="testMe" output="1"> > <cfargument name="one"> > <cfdump var="#arguments#" label="testMe" output="browser" /> > <cfinvoke method="testMe2" argumentcollection="#arguments#" /> > </cffunction> > > > > This FAILS; second dump shows a struct with keys "1" and "ONE", both of > which are empty: > <cffunction name="testMe2" output="1"> > <cfargument name="one"> > <cfdump var="#arguments#" label="testMe 2" output="browser" /> > </cffunction> > > <cffunction name="testMe" output="1"> > <cfdump var="#arguments#" label="testMe" output="browser" /> > <cfinvoke method="testMe2" argumentcollection="#arguments#" /> > </cffunction> > > > > Hopefully this clarifies where things seem to be going wrong. Does this > seem illogical to anyone else, or is it just me? > > This email message may contain privileged and/or confidential information. > If you are not the intended recipient(s), you are hereby notified that any > dissemination, distribution, or copying of this email message is strictly > prohibited. If you have received this message in error, please immediately > notify the sender and delete this email message from your computer. > > CAUTION: The Agency of Human Services cannot ensure the confidentiality or > security of email transmissions. > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303856 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

