________________________________________
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Andy Powell
Sent: Friday, February 24, 2006 9:33 AM
To: CFCDev@cfczone.org
Subject: RE: [CFCDev] Speaking of Structures

What you're trying to use is called implicit getters and setters.  It is
implemented in AS 2.0, but has not yet made its way to CF.  It's a nifty way
to implement data hiding as well as add some functionality behind your
getters and setters.   When implemented it looks just like you're setting
and getting a property of the object. 




I've done this in CF here:

http://www.depressedpress.com/Content/Development/ColdFusion/DPLibraries/Ind
ex.cfm

Check out the Root Package and the root component.  Docs for that are here:

http://www.depressedpress.com/Content/Development/ColdFusion/DPLibraries/Doc
umentation/DocViewer.cfm?Component=cfc_DepressedPress.DP_Component

The root component provides simple, generic "getProp()" and "setProp()"
methods which will call user-defined getters and setters if they exist.
Optionally a meta-data system can be used to provide type validation with
the generic getter/setter.

Jim Davis




----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to 
cfcdev@cfczone.org 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).

An archive of the CFCDev list is available at 
www.mail-archive.com/cfcdev@cfczone.org


Reply via email to