"foo" would also be available to custom tags and templates included using
CFMODULE in the caller scope (caller.foo).

Another scope not mentioned yet is "request" in which variables are
available throughout the life of a single request as "request.varname"
regardless if it's called from the same page, an included page, or a custom
tag/module.  Request variables must be scoped (like application/session)
IIRC.


-Justin


> -----Original Message-----
> From: Duncan [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, October 18, 2005 10:52 PM
> To: CF-Talk
> Subject: Re: evaluation order of CF scopes
> 
> ok so these particular scopes dont get searched through if an 
> unamed var is
> present.
> 
> Do I also understand that if you do this:
> 
> <cfset foo = "bar" />
> <cfoutput>#foo#</cfoutput>
> 
> a) foo is actually sitting in the variables scope?
> b) and that foo is only available to
> - child templates included with cfinclude and
> - this current template
> 
> Is this correct?
> 
> On 10/19/05, Nathan Strutz <[EMAIL PROTECTED]> wrote:
> >
> > Charlie,
> >
> > You mean:
> >
> > <cfset application.foo = "bar" />
> > <cfoutput>#foo#</cfoutput>
> >
> > although they'll both throw the same exception.
> >
> > Duncan, one of my favorite spots in the livedocs (well, it 
> was until i
> > memorized it all...) is this one, dealing directly with 
> your question:
> > http://livedocs.macromedia.com/coldfusion/7/htmldocs/00000911.htm
> >
> > Though, I think i like the one from cfmx 6.0 better:
> >
> > 
> http://livedocs.macromedia.com/coldfusion/6/Developing_ColdFus
> ion_MX_Applications_with_CFML/Variables7.htm
> >
> >
> > -nathan strutz
> > http://www.dopefly.com/
> >
> >
> >
> > On 10/18/05, Charlie Griefer <[EMAIL PROTECTED]> wrote:
> > > I believe those scopes need to be explicitly ...um...scoped :)
> > >
> > > e.g.
> > >
> > > <cfset application.foo = "bar" />
> > > <cfoutput>#bar#</cfoutput>
> > >
> > > will result in an error, since CF hunts thru the specific scopes
> > > (query, arguments, variables, cgi, url, form, client) and does not
> > > encounter 'bar' in any of them.
> > >
> > >
> > > On 10/18/05, Duncan <[EMAIL PROTECTED]> wrote:
> > > > I was just thumbing through my CFMX7 Developer Exam 
> StudyGuide and
> > there is
> > > > a section that lists the evaluation order of the scopes of CF.
> > Something is
> > > > bugging me though - when does application. session. 
> server. request.
> > get
> > > > evaluated?
> > > >
> > > > --
> > > > Duncan I Loxton
> > > > www.sixfive.co.uk <http://www.sixfive.co.uk> 
> <http://www.sixfive.co.uk
> > >
> > > > [EMAIL PROTECTED]
> > > >
> > > > "I can only please one person per day. Today is not 
> looking good.
> > Tomorrow
> > > > isn't looking much better." Dilbert
> > > >
> > > >
> > > >
> > >
> > >
> >
> > 
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:221435
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to