That would be a welcome change, Sean. Hubba hubba! -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sean Corfield Sent: Friday, January 20, 2006 2:19 AM To: [email protected] Subject: Re: [CFCDev] Bean and CFC question
On 1/19/06, Hal Helms <[EMAIL PROTECTED]> wrote: > why am I writing separate getters and setters when I no longer am > concerned about pseudo-static typing? So, I wrote universal > get(propertyName) and set(propertyName, value) methods for BaseComponent.cfc. My initial reaction was "yuck!" until I saw your caveat about detecting and calling getX() if it is defined. That's pretty sweet. What would be really nice would be a way for CFCs to respond to *any* method dynamically. Like Smalltalk does with #notUnderstood and Ruby does with :missing_method. I proposed an ER for CFMX, 61956. With that enhancement, you'd be able to write just the getters/setters that did custom work and then in your "unimplemented" method, you could see if the missing method began with "get" or "set" and then extract the property name and do the simple operation directly (like your base get() / set() methods do). I prefer that approach because it doesn't require the universal base class - and because it could easily be injected into any object to allow delegation etc. -- Sean A Corfield -- http://corfield.org/ Got frameworks? "If you're not annoying somebody, you're not really alive." -- Margaret Atwood ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] 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/[email protected] ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] 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/[email protected]
