Dave's right...

The Variables scope IS the private scope.

It's the THIS scope that's public, can be directly gotten and set
against, and breaks any and all rules of encapsulation.

variables.foo = "private"
this.bar = "public"

So your getters and setters can be the window on the CFC's private
data, provided that they're public methods. Sometimes you're going to
have a really restricted API and you may only have one public getter
out of 20 methods. But yeah, your getters and setters are for
manipulating variable-scope data.

Laterz,
J

On Apr 4, 2005 9:33 AM, Dave Watts <[EMAIL PROTECTED]> wrote:
> > Also, I know this isn't what you were asking about, but
> > aren't getters and setters typically used to access private
> > data, not something in the variables scope? That's their
> > point, right? If the data's in the variables scope, it's not
> > private, and anything could just set it directly. Or am I
> > missing something?
> 
> I'm pretty sure that the Variables scope is private within a CFC now, and
> the This scope is public.
> 
> Dave Watts, CTO, Fig Leaf Software
> http://www.figleaf.com/
> 
> Fig Leaf Software provides the highest caliber vendor-authorized
> instruction at our training centers in Washington DC, Atlanta,
> Chicago, Baltimore, Northern Virginia, or on-site at your location.
> Visit http://training.figleaf.com/ for more information! 


-- 
Continuum Media Group LLC
Burnsville, MN 55337
http://www.web-relevant.com
http://www.web-relevant.com/blogs/cfobjective


----------------------------------------------------------
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).

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


Reply via email to