It's purely with CF's implementation of CFCs.  The 'this' scope holds
all public data, regardless of type, so if you have two pieces that
have the same name (as you do) they'll conflict.  In theory, you
shouldn't be having fields and methods with the same name (you've got
naming issues if you do), but it is another reason not to use the
'this' scope.

cheers,
barneyb

On Thu, 24 Feb 2005 12:42:56 -0500, John Farrar
<[EMAIL PROTECTED]> wrote:
> So... as some of you have brought to my attention...
> 
> <cfset this.myThing = "value">
> 
> <cffunction name="myThing">
> 
> </cffunction>
> 
> This creates a conflict... to my surprise. It shouldn't in my mind.
> (Must be my old VB background here... but that wasn't an issue then was
> it? I haven't done any .NET... just way back at VB6 and before.) I have
> been doing CF since version 4 and it seemed logical to assume that
> attributes and methods shouldn't be conflicting. (Which it does
> apparently.) Is this an issue in Java... what is the problem with this?
> 
> Thanks,
> 
> John Farrar


-- 
Barney Boisvert
[EMAIL PROTECTED]
360.319.6145
http://www.barneyb.com/

Got Gmail? I have 50 invites.

----------------------------------------------------------
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