Title: RE: [CFCDev] "this" scope vs. unnamed

| Matt Liotta:
|
| There are many perfectly valid reasons for using public fields in an
| object. For example, many classes in the Java hierarchy use public
| fields for constants. In fact, I find it quite annoying when class
| authors require bit-based states without representing those states with
| constants.


How, in a CFC, can one prevent a "constant" from being overwritten:

[myObject.cfc]
<cfcomponent>
<cfproperty name="CONSTANT_TRUE" default="true" type="boolean">
...
</cfcomponent>

[badPage.cfm]
<cfset anObject = CreateObject("component","myObject")>
<cfset anObject.CONSTANT_TRUE = false>


?

--
ecd

Reply via email to