>It's also a right pain in the arse that one cannot iterate over the
>function local scope (well: no way that I've found, anyhow, so I'm all
>ears if someone else can do it :-), with a for-in loop, or a
>structKeyArray() or something similar.
Here you go! Add this to your CFFUNCTION
<CFSET oVarScope = getPageContext().getActiveFunctionLocalScope()>
<CFLOOP COLLECTION="#oVarScope#" ITEM="oVar">
<CFIF oVar IS NOT "this"
AND oVar IS NOT "arguments"
AND NOT StructKeyExists(arguments, oVar)
AND NOT StructKeyExists(this, oVar)>
<CFSET oVarName = oVar>
<CFSET oVarValue = Evaluate("oVarScope.#oVarName#")>
<CFSET WriteOutput(oVarName & " = ")>
<CFDUMP VAR="#oVarValue#">
</CFIF>
</CFLOOP>
Modify as necessary and you can easily loop over the var scope!!!
Roland Collins
CTO, InvestEdge
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev'
in the message of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).
An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]