oh, wow, I got confused there...
This guy wasn't doing
<cffunction name="myFunction">
<cfargument name="name" type="string" />
<cfargument name="likes" type="string" />
<!--- logic --->
</cffunction>
So here, there's no need for argumentCollection, he can just do
myFunction("mike", "beer,soccer,women")
Turns out, he was doing this:
<cffunction name="myFunction">
<cfargument name="whatever" type="struct" />
<!--- logic --->
</cffunction>
so this is a problem. In CF8.0.1, you cannot pass in an implicit struct
when calling a function. In CF8.0.0 you cannot even do an implicit
struct inside an implicit struct:
<cfset args = {
now = now(),
stuff = {
name = "mike",
likes = "whatever"
}
} />
There's the rub!
Andy Matthews wrote:
> Right. Not allowed in CF8, but it is allowed in CF9.
>
>
>
>
> andy
>
> -----Original Message-----
> From: Leigh [mailto:[email protected]]
> Sent: Tuesday, September 14, 2010 3:07 PM
> To: cf-talk
> Subject: Re: CF8+: Short Hand notation for calling a function within a
> component.
>
>
> I do not remember that being allowed in CF8. But you could assign the
> structure to a variable. Then use argumentCollection
>
> <cfscript>
> args = {name="mike", likes="beer,soccer,women"}; myFunction(
> argumentCollection=args ); </cfscript>
>
>
>
>
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:337027
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm