|
I'd go
with his second. If you need it in cfscript, here's an (untested) UDF for
you:
<cffunction name="invoke">
<cfargument name="component" required="Yes" type="string" /> <cfargument name="method" required="Yes" type="string" /> <cfargument name="args" required="No" type="struct" /> <cfif ArrayLen(arguments) GT 2> <cfinvoke component="#arguments.component#" method="#arguments.method#" returnvariable="tmpReturn"/> <cfelse> <cfinvoke component="#arguments.component#" method="#arguments.method#" argumentcollection="#arguments.args#" returnvariable="tmpReturn"/> </cfif> <cfreturn tmpReturn /> </cffunction> then call
it like this:
var obj =
"dataObj";
var methd
= "getStateData()";
var newVar
= invoke(obj,methd);
structInsert(*yourscope*, newVar);
any flaws
in that? please tell me so I know.
--
|
Title: Message
- RE: [CFCDev] Setting Scoped Va... Nathan Dintenfass
- Re: [CFCDev] Setting Scoped Va... Joe Eugene
- Re: [CFCDev] Setting Scoped Va... Tyler Silcox
- Re: [CFCDev] OT: CF Trouble Ti... cf_nut
- Re: [CFCDev] Dynamic CFC Calls Joe Eugene
- RE: [CFCDev] Dynamic CFC Calls Barney Boisvert
- RE: [CFCDev] Dynamic CFC Calls Joe Eugene
- Re: [CFCDev] Dynamic CFC Calls jon hall
- RE: [CFCDev] Dynamic CFC Calls Brendan O'Hara
- Re: [CFCDev] Dynamic CFC Calls Joe Eugene
- Davis, Eric
