1) (Like in the onTap Framework) the universal getter/setter first checks to see if a dedicated getter/setter exists (these must be named "getPropertyname"/"setPropertyname" for this to work). If one does work, it uses them.
2) They then checks to see if a special struct, "PropertyDefinition" exists and if the property name is a key in that struct. That struct contains the same information you'd see in CFPARAM (type, default value, etc) and CFPARAM is used to test type (for both output and input). This works because for a getter/setter pair the input and output types will always be the same.
3) If all of that fails it sets/gets the property "blind".
How do you create private vs. public properties in this way? Douglas mentioned using cfproperty tags to define what values are gettable, but I assume that means that if a property is *not* gettable but does exist then the other functions within the CFC which manipulate the values must do so directly (foo = "new value") rather than through the getters/setters. Which sort of defeats the purpose of having flexible getters and setters, right?
Can cfproperty accept arbitrary attributes? Would an "access" attribute (private|public) allow a reasonable check, and if so, then how does the generic code know whether the caller is granted access to private properties?
--
Ben Curtis
WebSciences International
http://www.websciences.org/
v: 310 478 6648
f: 310 235 2067----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' in the message of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported by Mindtool, Corporation (www.mindtool.com).
An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]
