People know they can do this - the problem I think is simply the documentation. I think people wanted this concept (of the private scope and This) to be a bit more fleshed out. Also, in 'normal' CFML pages, you can dump all local variables by dumping the Variables scope. Even though private variables act like Variables variables (ick, sorry ;), you can't cfdump it. So, it's not a question of people not knowing away around the issue, but just wanting things to be a bit more elegant. (Of course, that's my take on it and I don't speak for everybody.)
======================================================================= Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc Member of Team Macromedia Email : [EMAIL PROTECTED] Blog : www.camdenfamily.com/morpheus/blog Yahoo IM : morpheus "My ally is the Force, and a powerful ally it is." - Yoda > -----Original Message----- > From: Brad Howerter [mailto:[EMAIL PROTECTED] > Sent: Monday, March 10, 2003 2:31 PM > To: CF-Talk > Subject: CFC theory > > > I've just read through the CFC Theory thread from last fall, > and I don't understand why noone ever suggested this: > > Why not just create the private scope? i.e. > > <cfcomponent> > <cfset private.anyvar = 'hidden value'> > </cfcomponent> > > Or use pr.anyvar for less typing. Or self.anyvar, or > anything other than the public 'this'. > > What am I missing? Why is there a big problem with 'this' > being public, when it is so easy to create private variables, > and you don't have to use the unnamed scope or the variables > scope (with the bug) to do it? > > Date: 09/02/2002 01:32 PM > Author: Jeffry Houser > > At 09:27 AM 9/1/2002 -0700, you wrote: > > > > 3. Is the data created inside a component protected from outside > > > forces? I'm a little grey on this one. You can create component > > > specific variables using the this scope. > > > >"this" scope is public, the unnamed scope is private so this gets a > >YES. > > :hmm: That is interesting. I don't like un-named scopes. I wish > someone at Macromedia took a little time to document this > stuff. I thought the variable was automatically put into the > this scope. I > have to agree with Hal on this one. That is a kludge. The > scope should > have a name. A scope named private would have been a better option. > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4