I've always used the technique of setting a variable to the caller scope so
that I can use the variables on the parent(caller page) and only use the
attribute scope when within a custom tag sense that scope refers to
variables assigned through the custom tag call. But
caller.attribute.variable says to me that you have a structure called
attribute with a key named variable name and your setting this structure key
value to a caller scope for referencing on the parent(caller) page. It
doesn't make sense that you would be setting it to the caller scope, and the
attribute scope at the same time like was implied, which is where my
confusion is. Can you address this?
Thanks,
Rick
-----Original Message-----
From: Fred T. Sanders [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 14, 2000 4:04 PM
To: Fusebox
Subject: Re: Variable Scoping
caller is more of a reference to the calling templates variables be they
attributes, local, or whatever.
A good example showing that it works is the formurl2attributes.cfm tag, and
off the top of my head I can't think of a good example to give on why you'd
want to.
Fred
----- Original Message -----
From: "Rick Lamb" <[EMAIL PROTECTED]>
To: "Fusebox" <[EMAIL PROTECTED]>
Sent: Tuesday, November 14, 2000 3:17 PM
Subject: RE: Variable Scoping
> I really don't understand caller.attributes.variable. Maybe somebody could
> explain why you would ever do this? Or if it would really work. And on
this
> topic, is it possible to assign any name for a scope of a variable? Like
> myvariables.variable? Cause it seems like this is what you would be doing
by
> using caller.attribute.variable. caller would be the scope, attribute
would
> be your custom named scope, and variable would be the variable name. Am I
> just confused here or what?
>
> Thanks,
>
> Rick
>
> -----Original Message-----
> From: Fred T. Sanders [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, November 14, 2000 2:13 PM
> To: Fusebox
> Subject: Re: Variable Scoping
>
>
> It would really depend on what you wanted the tag to do.
> In your case none of them really apply. As your already using it to set a
> persistant variable.
>
> If you were using the tag to update an attribute. scoped variable already
in
> place on the calling template/tag it would be
> caller.attributes.somevar
>
> If you were using it to update a request. scoped variable (variable that's
> alive for the duration of the page request) no caller. is needed as
request.
> scoped variable will cross tag boundaries so it would just be
> request.somevar.
>
> If the tag is just setting a local variable used by the calling template
> then its just caller.somevar.
>
> Hope this helps
>
> Fred T. Sanders
> Charlottesville, VA
> -------------------------------------------
> Programmers don't lie...
> They just can't tell time.
>
>
>
> ----- Original Message -----
> From: "Greg Wolfinger" <[EMAIL PROTECTED]>
> To: "Fusebox" <[EMAIL PROTECTED]>
> Sent: Tuesday, November 14, 2000 2:14 PM
> Subject: Variable Scoping
>
>
> > Hey Guys:
> >
> > I've just started to research the fusebox methodologies and have found =
> > them very helpful. I picked up a copy of the new book when I was at the
=
> > developer conference last week. The only part that is really throwing =
> > me off is the variable scoping.
> >
> > It says to use the Attributes and Request scoping for variables. Say I
=
> > had a action file (act_nav-trail.cfm) that is used like a custom tag to
=
> > create or append a session variable that keeps track of the users =
> > navigation throughout the site.
> >
> > That action file spits back to the calling template (i.e. the index.cfm
=
> > file) a variable called navTrail that is then passed to my display =
> > (dsp_nav-trail.cfm) file. In the action file should I set the variable
=
> > to Caller.Request.navTrail or Caller.Attributes.navTrail or just =
> > Caller.navTrail?? Thanks, also if you know of any really good visuals on
=
> > the web that helps dipict the fusebox scoping methodologies it would be
=
> > most appreciated.
> >
> > Best Regards,
> >
> >
> > Greg
> >
> > ------=_NextPart_000_0007_01C04E45.4397B6A0
> > Content-Type: text/html;
> > charset="iso-8859-1"
> > Content-Transfer-Encoding: quoted-printable
> >
> > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> > <HTML><HEAD>
> > <META content=3D"text/html; charset=3Diso-8859-1" =
> > http-equiv=3DContent-Type>
> > <META content=3D"MSHTML 5.00.2614.3500" name=3DGENERATOR>
> > <STYLE></STYLE>
> > </HEAD>
> > <BODY bgColor=3D#ffffff>
> > <DIV><FONT face=3DArial size=3D2>Hey Guys:</FONT></DIV>
> > <DIV> </DIV>
> > <DIV><FONT face=3DArial size=3D2>I've just started to research the =
> > fusebox=20
> > methodologies and have found them very helpful. I picked up a copy
=
> > of the=20
> > new book when I was at the developer conference last week. The =
> > only part=20
> > that is really throwing me off is the variable scoping.</FONT></DIV>
> > <DIV> </DIV>
> > <DIV><FONT face=3DArial size=3D2>It says to use the Attributes and =
> > Request scoping=20
> > for variables. Say I had a action file (act_nav-trail.cfm) that is
=
> > used=20
> > like a custom tag to create or append a session variable that keeps =
> > track of the=20
> > users navigation throughout the site.</FONT></DIV>
> > <DIV> </DIV>
> > <DIV><FONT face=3DArial size=3D2>That action file spits back to the =
> > calling template=20
> > (i.e. the index.cfm file) a variable called navTrail that is then passed
=
> > to my=20
> > display (dsp_nav-trail.cfm) file. In the action file should I set
=
> > the=20
> > variable to Caller.Request.navTrail or Caller.Attributes.navTrail or =
> > just=20
> > Caller.navTrail?? Thanks, also if you know of any really good visuals on
=
> > the web=20
> > that helps dipict the fusebox scoping methodologies it would be most=20
> > appreciated.</FONT></DIV>
> > <DIV> </DIV>
> > <DIV><FONT face=3DArial size=3D2>Best Regards,</FONT></DIV>
> > <DIV> </DIV>
> > <DIV> </DIV>
> > <DIV><FONT face=3DArial size=3D2>Greg</FONT></DIV></BODY></HTML>
> >
> > ------=_NextPart_000_0007_01C04E45.4397B6A0--
> >
>
> --------------------------------------------------------------------------
> ----
> > To Unsubscribe visit
> http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/fusebox or
> send a message to [EMAIL PROTECTED] with 'unsubscribe' in
> the body.
> >
>
> --------------------------------------------------------------------------
--
> --
> To Unsubscribe visit
> http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/fusebox or
> send a message to [EMAIL PROTECTED] with 'unsubscribe' in
> the body.
>
> --------------------------------------------------------------------------
----
> To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/fusebox or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
>
----------------------------------------------------------------------------
--
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/fusebox or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/fusebox or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.