Maybe it is known or expected, but I was surprised it works. If you
pass arguments to a function, but don't declare them via the
cfargument tag, it exists anyway. You lose the name of the argument,
but can still access it via the arguments struct.

*************The CFC:

<cfcomponent output="false">

<cffunction name="functionOne">
        <cfdump var="#arguments#" label="functionOne dump">
        <cfset functionTwo(argumentCollection=arguments) />
</cffunction>


<cffunction name="functionTwo">
        <cfdump var="#arguments#" label="functionTwo dump">
</cffunction>

</cfcomponent>


**********The CFM
<cfset myTest =
createObject('component','testArgCollection').functionOne('something','or
another','hello world')/>

**********
The dump shows the 3 values passed into functionOne. Because I blindly
pass all arguments via argumentCollection, both dumps have all
parameters.

Again, maybe this is expected, but I think it is something to watch
out for in case you're passing more than you think (or want).

-- 
Matt Williams
"It's the question that drives us."

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CFCDev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfcdev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to