hang on, isn't it the case that the FileExisted variable is in the File
scope.  It's not in the Variables scope.  It's still available as a
variable in the calling page, which is why the custom tag can pick it up in
the caller scope.  If you just output it in the test.cfm without any scope,
I assume that would display it, but to transfer it explicitly from
File.FileExisted to Variables.FileExisted you'll probably have to CFSet it.

that's my understanding anyhow.


Duncan Cumming
IT Manager

http://www.alienationdesign.co.uk
mailto:[EMAIL PROTECTED]
Tel: 0141 575 9700
Fax: 0141 575 9600

Creative solutions in a technical world

----------------------------------------------------------------------
Get your domain names online from:
http://www.alienationdomains.co.uk
Reseller options available!
----------------------------------------------------------------------
----------------------------------------------------------------------




                                                                                       
                                 
                    Adrian Lynch                                                       
                                 
                    <[EMAIL PROTECTED]        To:     "Dev (E-mail)" <[EMAIL 
PROTECTED]>                      
                    ubble.net>                cc:                                      
                                 
                                              Subject:     [ cf-dev ] 
CFFILE/CALLER/What?                               
                    31/03/2003 11:55                                                   
                                 
                    AM                                                                 
                                 
                    Please respond to                                                  
                                 
                    dev                                                                
                                 
                                                                                       
                                 
                                                                                       
                                 



I've noticed a strange problem when using cffile in a custom tag that I
hope
someone might shed some light on. To help explain myself you can run the
two
pages below, one is the custom tag strange.cfm, the other a form page.

Within strange.cfm CALLER.FileExisted exists without me setting it (the
cfparam and cfset are commented out at this point). Yet when I try and
reference VARIABLES.fileExisted in the calling page I get an error. Using
cfparam doesn't help, which I find strange, but cfset does what it should
do.

This was run on CFMX with no updaters and now at work with CFMX and updater
2.

Anyone have an explanation?

----------------------------------
           strange.cfm
----------------------------------
<!--- Upload the file to the current directory --->
<cffile action="upload" filefield="file" nameconflict="skip"
destination="#GetDirectoryFromPath(GetCurrentTemplatePath())#">

<!--- <cfparam name="CALLER.FileExisted" default="no"> --->
<!--- <cfset CALLER.FileExisted = "no"> --->

<p>
<cfoutput>
           Tag Debug<br>
           CFFILE.FileExisted = #CFFILE.FileExisted#<br>
           CALLER.FileExisted = #CALLER.FileExisted#<br>
</cfoutput>
<!--- CALLER:<cfdump var="#CALLER#"> --->
<!--- CFFILE:<cfdump var="#CFFILE#"> --->
</p>

----------------------------------
           test.cfm
----------------------------------
<html>
<head>
           <title>Test</title>
</head>

<body>

<cfif IsDefined("FORM.submit")>
           <cf_strange>
</cfif>

<form method="post" action="test.cfm" enctype="multipart/form-data">
           <input type="file" name="file">
           <input type="submit" name="submit" value="Submit">
</form>

<cfif IsDefined("FORM.submit")>
<p>
<cfoutput>
           Page Debug<br>
           CFFILE.FileExisted = #CFFILE.FileExisted#<br>
           VARIABLES.FileExisted = #VARIABLES.FileExisted#<br>
</cfoutput>
<!--- VARIABLES:<cfdump var="#VARIABLES#">
CFFILE:<cfdump var="#CFFILE#">
--->
</p>
</cfif>

</body>
</html>
----------------------------------
----------------------------------


Adrian Lynch
Web Developer
Thoughtbubble Ltd
----------------------
United Kingdom
http://www.thoughtbubble.net
Ph: +44 (0) 20 7387 8890
----------------------
The information in this email and in any attachments is confidential and
intended solely for the attention and use of the named addressee(s) . Any
views or opinions presented are solely those of the author and do not
necessarily represent those of Thoughtbubble. This information may be
subject to legal, professional or other privilege and further distribution
of it is strictly prohibited without our authority. If you are not the
intended recipient, you are not authorised to disclose, copy, distribute,
or
retain this message. Please notify us on +44 (0) 20 7387 8890


--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]






-- 
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]

Reply via email to