Scott don't know if this is what you're looking for but you can do this at
the top of your cffunction:
<cffunction name="somename" returntype="somereturntype">
<cfscript>
var my = structNew(); // or var my = {}; if you're running cf8
for(my.key in arguments){
"my.#my.key#" = arguments[my.key];
}
</cfscript>
</cffunction>
Doing this would do a deep copy of your arguments struct into your local
*var'd* variable "my". Using this method, you wouldn't need to use
cfargument at all though it can make handling argument defaults a bit of a
pain, but no less doable.
Is this the kind of thing you were looking for?
Chris
On Wed, Dec 31, 2008 at 9:18 AM, Scott Stewart <[email protected]>wrote:
> Confused programmer is confused (just because the title sounds like
> LOLSpeak)
>
> I've got this little piece of code that dynamically creates and
> populates a structure key pair, based on what's sent from a form with a
> dynamically
> generated set of fields (javascript "add row")
>
> For (i=1;i LTE Form.PE_Counter; i=i+1)
>
> if(StructKeyExists(FORM,'play_'&i)){
> session.NODA09_formStruct['play_'&i] = form['play_'&i];
>
> }
>
> I know that the arguments in a cf function are very particular about
> their placement, can I use similar code to create and populate arguments?
>
> --
> Scott Stewart
> ColdFusion Developer
>
> Office of Research Information Systems
> Research & Economic Development
> University of North Carolina at Chapel Hill
>
> Phone:(919)843-2408
> Fax: (919)962-3600
> Email: [email protected]
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317304
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4