ArgumentCollection passes named arguments; this is why the arguments are
undefined (the 'one' argument is not supplied and the other argument is
unnamed). I agree that the second argument being undefined is odd; not
entirely sure why but I think the above is the jist of it.
If you call the function as below you will get the results you expect:
<cfoutput>
#testMe(two = "sample string")#
</cfoutput>
Or like this:
<cfoutput>
#testMe(one = "sample string")#
</cfoutput>
However, if you really must take the order of arguments and pass them to the
second function then this will work (though it will ignore any named
arguments passed to the function and only work with the order):
<cffunction name="testMe" output="1">
<cfscript>
var argString = "";
var keys = StructKeyArray(arguments);
var testMe2Result = "";
var i = 0;
for(i=1; i LTE ArrayLen(keys); i=i+1)
argString = ListAppend(argString, '"#arguments[keys[i]]#"');
testMe2Result = Evaluate('testMe2(#argString#)');
</cfscript>
</cffunction>
HTH,
Dominic
--
Blog it up: http://fusion.dominicwatson.co.uk
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:303845
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4