On Friday, Nov 15, 2002, at 14:20 US/Pacific, Brook Davies wrote:
> An easy way around this is to dump the arguments struct into the 
> variables
> or request scope, which IS available to the calling template. Note, I
> received errors when I tried to copy a var from the argument scope to 
> the
> local scope like this:
>
> <cfset var MyID=arguments.campaignID>

"var" declares a local variable - local to the function and therefore 
not accessible to any included files.

> But doing this works:
>
> <cfset variables=duplicate(arguments)>

Hmm, I'd be a little wary of reassigning the "variables" scope - since 
currently in a CFC, "variables" refers to the *caller's* "variables" 
scope (this is a known bug). There's also no real need to duplicate() 
arguments, just create a private alias:

        <cfset args = arguments/>

That should work and will be faster.

Sean A Corfield -- Director, Architecture
Web Technology Group -- Macromedia, Inc.
tel: (415) 252-2287 -- cell: (415) 717-8473
aim: seancorfield -- http://www.macromedia.com
An Architect's View -- http://www.corfield.org/blog/

Introducing Macromedia Contribute. Web publishing for everyone.
Learn more at http://www.macromedia.com/contribute


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com

Reply via email to