On Sun, 14 Nov 2004 17:28:07 +0100, Magnus Wege <[EMAIL PROTECTED]> wrote:
> So can anybody point me to a link or give examples how and when to use the
> different scopes this/variables?
> 
Once I figured it out I created myself a little cheat sheet.

<cfcomponent>
  <cfset variables.private = "A private instance variable">
  <cfset this.public = "A public instance variable">
  <cffunction name="foo">
    <cfargument name="anArgument">
    <cfset var localFooVar = "">
    <cfset localFooVar = "Available within the scope of this function">
    <cfoutput>
      You passed me: #arguments.anArgument#
      I have a local var, whose value is:#localFooVar#. 
      I have an private instance variable, whose value is #variables.private#. 
      I have an public instance variable, whose value is #this.public#.
    </cfoutput>
  </cffunction> 
</cfcomponent>

Patrick

-- 
Patrick McElhaney
704.560.9117
http://pmcelhaney.blogspot.com
I still have 5 gmail invites.
----------------------------------------------------------
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 
[EMAIL PROTECTED]

Reply via email to