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
>How about objContacts.set("name","Joseph")
>and then objContacts.get("name")?
----------------------------------------------------------
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]