This is interesting and I don't have an answer.  Perhaps someone else can explain this.

The statement 

<cfset attributes.temp=structNew()>

will fail as described below if placed in a standard template, but works fine in a 
custom tag.  This led to my response to Brad.  Not being a Fuseboxer, I should have 
experimented further.

As Jason points out the following works fine in a standard template:

<cfset attributes.temp=3>

Why the difference with assigning simple values to attributes scope as opposed to 
structures?

> -----Original Message-----
> From: Jason Lotz [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, May 24, 2001 11:58 AM
> To:   CF-Talk
> Subject:      Re: Attributes Scoped Structure?
> 
> That's not true.  Fusebox uses nothing but Attributes scoped variables.  You
> can set Attributes variables anywhere.
> 
> ----- Original Message -----
> From: "Howarth, Craig (IBK-NY)" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Thursday, May 24, 2001 7:36 AM
> Subject: RE: Attributes Scoped Structure?
> 
> 
> Brad,
> 
> The attributes scope can only be used within a custom tag.  This is the
> error message that you get when you attempt to assign a value to the
> attributes scope in a normal template.
> 
> Craig
> 
> > -----Original Message-----
> > From: Brad Roberts [SMTP:[EMAIL PROTECTED]]
> > Sent: Thursday, May 24, 2001 9:55 AM
> > To: CF-Talk
> > Subject: Attributes Scoped Structure?
> >
> > Can you set a structure in the attributes scope?
> >
> > I'm wondering why this isn't working:
> >
> > <cfset attributes.temp=structnew()>
> >
> > I get the following error:
> > Cannot assign result to symbol attributes.temp
> >
> > Thanks in advance,
> >
> > Brad
> >
> >
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to