>If I may ask, assuming that dumping "arguments" isn't your final goal,
Heh. Strangely, no ;-)
>what is the practical impact of having a null value element in the
arguments scope? That is, what are you trying to do that the current
behavior prevents you from doing properly?
We had some crazy situation yesterday in which we were traversing a
structKeyList(), assuming that if the key was listed, then the key would
actually be there. From there, we were passing the arg to another
function which REQUIRED that key, and of course it failed.
This code snippet *kind of* demonstrates along the lines of what was
going on:
<cfcomponent>
<cffunction name="func" output="true">
<cfargument name="arg" required="no">
<cfset var keyList = structKeyList(arguments)>
<cfloop index="thisKey" list="#keyList#">
<cfoutput>[#thisKey#]</cfoutput><br />
<cfset func2(arg=arguments[thisKey])>
</cfloop>
</cffunction>
<cffunction name="func2" output="true">
<cfargument name="arg" required="yes">
<cfdump var="#arguments#">
</cffunction>
</cfcomponent>
Sure, this was easily fixed by doing a second test to see if that
argument *did* exist, by adding a structKeyExists() in. However it took
a couple of hours for me to weed through someone else's code to find out
that that was where the problem lay, and I considered that I wasted my
time having to "fix" something that isn't really broken.
My issue is more one of principle than one of an actual problem.
Adam
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev'
in the message of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).
An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]