|
Drop this in your CFC then execute it from within:
<CFFUNCTION NAME="getVariablesScope" RETURNTYPE="struct" OUTPUT="false" ACCESS="private"> <CFSCRIPT> var stReturn = StructNew(); var oVar = "";
for (oVar IN variables) { if (oVar IS NOT "this" AND NOT StructKeyExists(this, oVar)) stReturn[oVar] = variables[oVar]; }
return stReturn; </CFSCRIPT> </CFFUNCTION>
Hope this helps, Roland
From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jim McMullen (Devlab)
Is there a way to create a list of the variable names of instance data in the variables scope without assembling it manually?
I thought I could do this...
<cffunction name="getVariablesKeyList" returntype="string" access="public"> <cfreturn StructKeyList(variables)> </cffunction>
...But of course in addition to all the variable names, this function also adds to the list the names of all the CFC's functions, the word "this", the word "variables", etc.
Anyone got a better idea or a UDF I can use? Thanks.
Jim McMullen Devlab, Inc.
|
- [CFCDev] Getting the names of Variables in Variabl... Jim McMullen \(Devlab\)
- Re: [CFCDev] Getting the names of Variables i... Sean A Corfield
- RE: [CFCDev] Getting the names of Variables i... Nathan Dintenfass
- RE: [CFCDev] Getting the names of Variables i... Roland Collins
- RE: [CFCDev] Getting the names of Variabl... Nathan Dintenfass
- RE: [CFCDev] Getting the names of Var... Roland Collins
- RE: [CFCDev] Getting the names of... Jim McMullen \(Devlab\)
- Re: [CFCDev] Getting the names of... Sean A Corfield
