You can't! Chalk it up to another downside of CFCs.

-Matt

On Wednesday, July 30, 2003, at 05:04 PM, Davis, Eric wrote:

| 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


----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev' in the message of the email.


CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

Reply via email to