Always use getters/setters. This allows for encapsulation.
 
I use "variables.instance.propertyA", "variables.instance.propertyB", etc. and then getters/setters for each, e.g.
 
<cffunction name"getPropertyA" access="public" returntype="WHATEVER">
    <cfreturn variables.instance.propertyA />
</cffunction>
 
And then you write a function similarly for the setter...
 
BTW, "Rooibos Generator" by Peter Farrell, accessible at:
 
 
 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gurevich, Gerry (NIH/NIEHS)
Sent: Wednesday, October 12, 2005 11:01 AM
To: [email protected]
Subject: [CFCDev] Inside the CFC: use Getter/Setter or Instance Scope

If I’m inside a CFC and I’ve created an instance scope, how should I access the properties of the object.

 

this.getBlah  or instance.Blah

 

Any thoughts?

 

-----------------------------------

Gerry Gurevich

Application Development

NIEHS ITSS Contractor
Lockheed Martin Information Technology
919-361-5444 ext 311

 

----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com).

CFCDev is supported by New Atlanta, makers of BlueDragon
http://www.newatlanta.com/products/bluedragon/index.cfm

An archive of the CFCDev list is available at www.mail-archive.com/[email protected]

Reply via email to