|
I have getters and setters. My question is specifically targeted for
when you are inside the CFC. Shouldn’t the methods inside an object
have direct access to that object’s properties? ----------------------------------- Application Development NIEHS ITSS Contractor From: Cody Caughlan
[mailto:[EMAIL PROTECTED] 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 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? ----------------------------------- Application Development NIEHS ITSS Contractor 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] |
- RE: [CFCDev] Inside the CFC: use Getter/Sette... Gurevich, Gerry (NIH/NIEHS)
- Re: [CFCDev] Inside the CFC: use Getter/... Peter J. Farrell
- RE: [CFCDev] Inside the CFC: use Get... Paul
- Re: [CFCDev] Inside the CFC: use ... Bill Rawlinson
- Re: [CFCDev] Inside the CFC: use... Peter J. Farrell
- RE: [CFCDev] Inside the CFC: use Getter/... Phillip Senn
- Re: [CFCDev] Inside the CFC: use Gett... Barney Boisvert
- RE: [CFCDev] [BLANK AGAIN] Inside... John Ottenbacher
- RE: [CFCDev] Inside the CFC: use ... Phillip Senn
- RE: [CFCDev] Inside the CFC: use ... Phillip Senn
- Re: [CFCDev] Inside the CFC: ... Bill Rawlinson
