Just an FYI, you don't need the evaluate, you can just do, <cfreturn variables[arguments.property]>.
=========================================================================== Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc (www.mindseye.com) Member of Team Macromedia (http://www.macromedia.com/go/teammacromedia) Email : [EMAIL PROTECTED] Blog : www.camdenfamily.com/morpheus/blog Yahoo IM : morpheus "My ally is the Force, and a powerful ally it is." - Yoda > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > [EMAIL PROTECTED] > Sent: Thursday, January 08, 2004 8:15 AM > To: [EMAIL PROTECTED] > Subject: RE: [CFCDev] Best Practices Question: Getters and Setters > > I messed around with this concept before some. > > Using <cfproperty name="variables.foo" type="datattype"> and > the below seemed to work for me at enforcing the datatype. > > > <cffunction name="getProperty" access="public" output="false" > returntype="any"> > <cfargument name="property" required="true" > type="string"> > <cfif IsDefined("variables.#arguments.property#")> > <cfreturn > evaluate("variables.#arguments.property#") /> > <cfelse> > <cfreturn "" /> > </cfif> > </cffunction> > ---------------------------------------------------------- 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]
