Title: Message
Taco,
 
I had a quick look through this link you posted go ahead an buy the book because it is all valid.
 
This is very legal code
 
<cfcomponent>
    <cfset this.Firstname = "" />
    <cfset this.Lastname - "" />
</cfcomponent>
 
The above code means that the data can be referenced outside the cfc like this
 
<cfset ci = CreateObject("component","test") />
<cfset ci.Firstname = "testing me out" />
 
Or you could write extra code and have getters and setters methods to do the above, just use what you think will be best for you.
 
Now inside a method to make the function thread safe, you should always define local calls to the method with a var as such
 
<cffunction name="Test">
    <cfset var TestVar = 100 /> // This variable is local to this method.
</cffunction>
 
In the first example you could also do this
 
<cfcomponent>
    <cfset Variable.Firstname = "" />
    <cfset Variable.Lastname = "" />
</cfcomponent>
 
or
 
<cfcomponent>
    <cfset Firstname = "" />
    <cfset Lastname = "" />
</cfcomponent>
 
to make these variables private to the cfc...
 
Hope this helps a bit more.
 


Regards
Andrew Scott
Technical Consultant

NuSphere Pty Ltd
Level 2/33 Bank Street
South Melbourne, Victoria, 3205

Phone: 03 9686 0485  -  Fax: 03 9699 7976  

---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED] Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to