Title: this
The un-named scope is only used for functions.
 
Data can be kept privately inside a CFC using the variables scope since the release of CFMX 6.1. Any variables that are set in the variables scope of a CFC are available only inside that cfc. Simlar to the privacy of the variables scope in a custom tag. The calling page can never directly access it, but included files and custom tags can using variables.xxx and caller.xxx respectively. It is not generally recommended that you access the caller scope unless you are passing data back out of the custom tag as it increases the coupling of the tag with its environment.
 
It is fairly common practice to create a structure in the variables scope of a CFC to contain instance data. That way you can retrieve it as a single block if you need to.
 
Spike

--------------------------------------------
Stephen Milligan
Code poet for hire
http://www.spike.org.uk

Do you cfeclipse? http://cfeclipse.tigris.org

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Taco Fleur
Sent: Monday, June 28, 2004 2:58 PM
To: CFAussie Mailing List
Subject: [cfaussie] this

So the this. structure is available outside CFCs and can be directly accessed, and the closed you get to protecting the variables is by using the un named scope, which is basically a work-around. Is it not better to keep using the this scope as intended and hope that the way it functions will change in the next release of ColdFusion?

---
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/
Register now for the 3rd National Conference on Tourism Futures, being held in Townsville, North Queensland 4-7 August - www.tq.com.au/tfconf
---
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