Variables (of some form) does exist and is usable:
<cfcomponent>

        <cffunction name="OnRequestStart">
                <cfset Apple = "Apple"/>
                <cfset Request.Ball = "Ball"/>
                <cfset Variables.Camel = "Camel"/>
        </cffunction>

        <cffunction name="OnRequest">
                <cfdump var="#Apple#"/>
                <cfdump var="#Request#"/>
                <cfdump var="#Variables#"/>
        </cffunction>

</cfcomponent>

This all worked.
The Variables in the third dump contained both Apple and Camel.

>I am not sure if the "public" VARIABLES scope exists in the
>OnRequestStart() event method. It might not exist until OnREquest(). If
>it does, you are probably gonna get all kinds of conflicting issues
>since VARIABLES is ALSO a scope within the Application.cfc component. 
>
>Try this... Don't scope the variable at all. Just set variable names.
>ColdFusion by default puts these into the VARIABLES scope of the page.
>However, since you are in a component, this might not work (they might
>go into THIS scope). 
>
>Try the non-scoping method and see if that works. 
>
>
>.....................
>Ben Nadel
>Certified Advanced ColdFusion MX7 Developer
>www.bennadel.com
> 
>Need ColdFusion Help?
>www.bennadel.com/ask-ben/
>
>-----Original Message-----
>From: Leitch, Oblio [mailto:[EMAIL PROTECTED] 
>Sent: Monday, March 12, 2007 10:48 AM
>To: CF-Talk
>Subject: RE: variables scope & app.cfc methods
>
>Thank you for the work around.  However, I was asking about the
>variables scope, not the request scope.  If it can't be done, I'd rather
>know that.
>
>Oblio 
>
>-----Original Message-----
>From: Peter Boughton [mailto:[EMAIL PROTECTED]
>Sent: Monday, March 12, 2007 10:01 AM
>To: CF-Talk
>Subject: Re: variables scope & app.cfc methods
>
>Um, put it in the Request scope?
>
>> Does anyone know how to write a variables.var in the onRequestStart() 
>> and be able to read it onRequest()?  The usual suspects don't seem to 
>> work.
>
>This email message may contain privileged and/or confidential
>information. If you are not the intended recipient(s), you are hereby
>notified that any dissemination, distribution, or copying of this email
>message is strictly prohibited. If you have received this message in
>error, please immediately notify the sender and delete this email
>message from your computer.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs
http://www.adobe.com/products/coldfusion/flex2/

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:272367
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to