[thelist] CF: Attributes to Locals?

Raymond Camden jedimaster at macromedia.com
Fri Sep 14 12:41:15 CDT 2001


> that's part of my beef.  the other part is that these 
> variables are now simply variables with a dot in their name.  
> the developers think they're scoping their variables, but 
> they're not.  all that extra typing for nothing.  a quick 
> solution is to create a structure named attributes.  at least 
> then you're creating keys of a structure.
> 

Really? Now, that is bad. Since this is a bad week for me assuming
stuff, let me explain in case other's don't get what Jeff means...

In CF, if you do:

<CFSET X.Ray = 1>

you are NOT creating a structure. You are creating a var called "X.Ray".
To correctly make a structure and save data, you must _always_ do <CFSET
X = StructNew()> first.

-Ray





More information about the thelist mailing list