<cffunction name="myCFC">
<cfscript>
VARIABLES.myVar = "false";
THIS.myVar = "true";
</cfscript>
<cffunction name="myMethod">
<cfreturn myVar>
</cfunction>
</cffunction>
So Nathan, are you saying that these are two separate variables? If so
does that mean myMethod() would return false?
Adam Wayne Lehman
Web Systems Developer
Johns Hopkins Bloomberg School of Public Health
Distance Education Division
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Nathan Dintenfass
Sent: Monday, October 06, 2003 2:45 PM
To: [EMAIL PROTECTED]
Subject: RE: [CFCDev] Variable referencing in CFCs
No, not at all.
THIS is a reference to the public scope of the CFC instance.
VARIABLES is a scope global (but "private") to the CFC instance.
Generally speaking, using THIS for instance data is a bad practice (see
list
archives for ad nauseum discussion of this matter).
In your example you should ge an error because variables.local.myVar is
not
defined, nor is this.local.myVar
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Behalf Of Bryan F. Hogan
> Sent: Monday, October 06, 2003 11:32 AM
> To: [EMAIL PROTECTED]
> Subject: RE: [CFCDev] Variable referencing in CFCs
>
>
> So "this" and "variables" are the same? Forgive me for hounding.
>
> <cffunction>
> <cfset local.myVar=1>
> </cffunction>
>
> <cffunction>
> <cfset var test1=''>
> <cfset var test2=''>
> <cfset var local.myVar=2>
>
> <cfset test1=this.local.myVar>
> <cfset test2=Variables.local.myVar>
> <cfset test3=local.myVar>
> </cffunction>
>
> So test1=1? and test2=1? and test3=2?
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Behalf Of Adam Wayne Lehman
> Sent: Monday, October 06, 2003 2:30 PM
> To: [EMAIL PROTECTED]
> Subject: RE: [CFCDev] Variable referencing in CFCs
>
>
> I _think_ VARIABLES.local.myVar. If it's public it can definitely be
> accessed with THIS.local.myVar.
>
> Adam Wayne Lehman
> Web Systems Developer
> Johns Hopkins Bloomberg School of Public Health
> Distance Education Division
>
> ----------------------------------------------------------
> You are subscribed to cfcdev. To unsubscribe, send an email
> to [EMAIL PROTECTED] with the word '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]
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the word '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]
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the word '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]