Steven Brownlee wrote:
 >>  I'm not slamming or flaming this...just my thoughts.  Although it appears fast - I think I'd get a headache trying to call a setter for a getter  
 
Well you don't call the method setThis or getThat, you name it after the property.  Something like this.
 
 <cffunction name="section_id" returntype="any" output="false">
  <cfargument name="value" type="any" required="false">
  
  <cfif isDefined("arguments.value")>
   <cfset variables.section_id = arguments.value>
  <cfelse>
   <cfreturn variables.section_id>
  </cfif>
 </cffunction>
 
Then you just...
 
i = createobject("component", this.that.theOtherThing);
// Set the property value
i.section_id(4);
 
//Get the property value
value = i.section_id()
Yes, that would work... however the idea of having a combined [hybridized] getter/setter just isn't sitting right with me and really that is what I just trying to voice.  I just like having a getter method and a setter method - plain and straight-forward in their duties.  I also like having "more" control in regards to the things I mentioned in my previous post.

I am really not trying to argue about this and in the end as long it works - it's "ok" in my book.  FYI, explicitly calling what the method does (getThis or setThis) with a verb is what works in my brain.  It's just semantics to me and in the end, I'm the one who has to look at my code.  Just my preference and I'm stickin' to it ;-)

Best,
.Peter

-- 
Peter J. Farrell :: Maestro Publishing

blog	:: http://blog.maestropublishing.com
email	:: [EMAIL PROTECTED]
phone	:: 651-204-0513

There are 6 billion people on this planet.....and I like 8 of them.
--
----------------------------------------------------------
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]

Reply via email to