Yep, so  I guess this is one more reason not to name "arguments." and
"variables." variables the same thing...but still wack.

Tyler 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Brad Howerter
Sent: Tuesday, September 09, 2003 3:46 PM
To: '[EMAIL PROTECTED]'
Subject: RE: [CFCDev] Unexpected CFC behaviour, please explain!

It looks like what you originally wrote is correct so long as there is no
cfargument by that name.  But if there is a cfargument by that name, it is
copied into the unnamed scope and if you set it there it doesn't get copied
back to the argument scope and if you set it in the argument scope it isn't
recopied to the unnamed scope.  Not a problem, I guess, so long as you
access the variable you've set and not the other one.

-----Original Message-----
From: Tyler Silcox [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 09, 2003 1:33 PM
To: [EMAIL PROTECTED]
Subject: RE: [CFCDev] Unexpected CFC behaviour, please explain!


That is messed up. The first example looks like arguments is just before
local variables in the order of evaluation, but the second is just wack.
There's got to be something going on here...

Tyler

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Brad Howerter
Sent: Tuesday, September 09, 2003 2:52 PM
To: '[EMAIL PROTECTED]'
Subject: RE: [CFCDev] Unexpected CFC behaviour, please explain!

That seems reasonable, but it isn't correct, as this method demonstrates:

        <cffunction name="test3">
                <cfargument name="def" type="string" default="foo">
                <cfset variables.def = 'noway'>
                <cfoutput>def = #def#, arguments.def = #arguments.def#,
variables.def = #variables.def#<br></cfoutput>
                <cfset def = '123'>
                <cfoutput>def = #def#, arguments.def = #arguments.def#,
variables.def = #variables.def#<br></cfoutput>
        </cffunction>

This prints
def = foo, arguments.def = foo, variables.def = noway def = 123,
arguments.def = foo, variables.def = noway

Apparently the unnamed scope is still with us (at least in some manner) in
6.1.

-----Original Message-----
From: Tyler Silcox [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 09, 2003 12:41 PM
To: [EMAIL PROTECTED]
Subject: RE: [CFCDev] Unexpected CFC behaviour, please explain!


When you call an un-scoped "abc", CF is going to check the local "variables"
scope first, then run down the rest of the scopes until it finds a variable
named "abc", which in the function test, happens to be an "arguments"
variable.  

Same thing goes for you when you set "abc" without a scope, it is going to
automatically set the value into the "variables" scope, which is definitely
different from the arguments scope...(that is, unless I'm reading all of
this wrong)

So "abc" and "arguments.abc" are not the same thing.  When you call "abc" by
itself, you are really calling "variables.abc", then if it doesn't exists,
it will check for "url.abc", "form.abc", "arguments.abc", etc (not
necessarily in that order-I do not know where arguments fits in the order of
evaluation)->

Tyler



***
The information in this email is confidential and intended solely for the
individual or entity to whom it is addressed. If you have received this
email in error please notify the sender by return e-mail, delete this email,
and refrain from any disclosure or action based on the information.
****


----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to
[EMAIL PROTECTED] with the word '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]

----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the word '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