Hello all.

What's the closest thing CF has to "public static final" in java?

For example, I am writing a logging compoent, and I want to declare some constants:

<cfcomponent name="Log">
   <cfscript>
       this.DEBUG = 0;
       this.INFO = 10;
        // and so on..
</cfscript> </cfcomponent name="Log">


The idea being that in the client code, I can do something like:

myLogInstance.setLogLevel(Log.DEBUG); // I'm aware that Log.DEBUG will // fail, as CF doesn't have static // vars either


Now, the trouble with using /this/ is that someone can come along and reassign the values and it will all end in tears.
What practice does the Rest Of The World use for similar situations?

--
Haikal Saadh, Applications Programmer
Teaching and Learning Support Services

K405, Queensland University of Technology, Kelvin Grove Campus

[EMAIL PROTECTED], 3864 8633
CRICOS No. 00213J



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

CFCDev is supported by New Atlanta, makers of BlueDragon
http://www.newatlanta.com/products/bluedragon/index.cfm

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


Reply via email to