I think that's the gist of what has been said.

It's also useful to know that if you're getting an unexpected value in a
component when using the setter/getter system, you can easily add cftrace
tag to the setter to see how many times it's getting modified.

If that doesn't allow you to track down the problem, you can do this:

<cfif arguments.val eq 'somebadvalue'>
        <cfthrow message="bad value passed">
</cfif>

Then you can immediately zone in on the code that is passing the bad value
and do something about it.

If you use public data members it's a lot more tricky to deal with the above
situation.

Whether you're likely to encounter that or not is your guess, but that's one
of the many reasons I tend to use getters/setters rather than the this
scope.

Ultimately the getter/setter system takes more time to generate the initial
code, but provides for easier maintenance. The public data members provides
faster initial code, but tends to make maintenance more difficult. This is
not always the case, but it's a good rule of thumb if you're not sure.

Spike

--------------------------------------------
Stephen Milligan
Code poet for hire
http://www.spike.org.uk

Do you cfeclipse? http://cfeclipse.tigris.org 


 

>-----Original Message-----
>From: [EMAIL PROTECTED] 
>[mailto:[EMAIL PROTECTED] On Behalf Of 
>Taco Fleur
>Sent: Wednesday, June 30, 2004 6:59 PM
>To: CFAussie Mailing List
>Subject: [cfaussie] Re: this : summary I think...
>
>
>So all this discussion about this and that in the last few 
>days really could be summarized into.
>
>Don't use the this scope because you cannot control the data 
>type on it..
>
>You can shoot me if I am wrong, after all I only skimmed 
>through all these long emails..
>
>Register now for the 3rd National Conference on Tourism 
>Futures, being held in Townsville, North Queensland 4-7 August 
>- www.tq.com.au/tfconf
>
>---
>You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
>To unsubscribe send a blank email to 
>[EMAIL PROTECTED]
>Aussie Macromedia Developers: http://lists.daemon.com.au/


---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to