> I use the 'this' scope for what would be public static
> final variable
> in Java.  That is, values that are of use both inside and
> outside a
> class, but never change.  CF doesn't give you the ability
> to actually
> make them read-only (or make them class fields, rather
> than instance
> fields), but that's an lack of functionalitythat I live
> with.

yes and no...

<cfcomponent name="static">
        <cffunction name="getMyVar">
                <cfretrun 1>
        </cffunction>
</cfcomponent>

It's not technically a variable, rather it's a method which returns a
hard-coded value -- but because it's not actually stored in a
variable, it becomes essentially a constant. You can call
static.getMyVar() to return the value but unless you extend the
component you'll never be able to change what getMyVar() returns.
Which covers public and static... I'll grant that it doesn't allow you
the "final" part of what would be available with Java.

s. isaac dealey   954.927.5117
new epoch : isn't it time for a change?

add features without fixtures with
the onTap open source framework
http://www.fusiontap.com




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:196192
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to