Hi Jim,

How would you go about doing this?  I sorta disclaimed my post with
"unless the setter calls the appropriate property-specific setter"
piece...I assume that's what you're talking about doing?

I've been required to provide these methods before, and implemented
them by making sure set#arguments.propertyName# and
get#arguments.propertyName# existed, were functions, and then calling
them appropriately.  But at that point, why use the generics?

-joe


On Mon, 2 Aug 2004 09:22:13 -0400, Jim Davis
<[EMAIL PROTECTED]> wrote:
> 
> Both of these issues can be resolved if the generic getter and setter are
> intelligent enough.
> 
> Jim Davis
> 
> 
> 
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
> > Of Joe Rinehart
> > Sent: Monday, August 02, 2004 8:34 AM
> > To: [EMAIL PROTECTED]
> > Subject: Re: [CFCDev] Comment requests CFC instance vars
> >
> > I've generally avoided the set(property, value) and get(property)
> > style construction unless the setter calls the appropriate
> > property-specific setter (i.e., set("Name", "joe") calls
> > setName("joe")).
> >
> > The reason's I've avoided it:
> >
> > 1.  Allowing argument of any type - I want to make sure the Name
> > property is set to a string, not to a query.
> >
> > 2.  It could be seen as breaking encapsulation - what if something
> > specific needs to happen when you set the name, as opposed to setting
> > a different property?  Setting / getting of your properties needs to
> > be a black-box operation that allows for other things to take place
> > behind the scenes....using set("Name", "joe") really doesn't do much
> > different than placing the name member inside the this.
> >
> > -joe
> 
> 
> ----------------------------------------------------------
> 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]
> 


-- 
For Tabs, Trees, and more, use the jComponents:
http://clearsoftware.net/clear/?template=downloads.jComponents
----------------------------------------------------------
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]

Reply via email to