heheh I must admit since reading the book and discovering the joys of code
templates (previously didn't have time to explore studio enough to find it)
I just use them all the time. CTRL+J - a and hit ENTER and it types it for
me... laziness is the mother of all invention
Toby Tremayne
Code Poet and Zen Master of the Heavy Sleep
Show Ads Interactive
359 Plummer St
Port Melbourne
VIC 3207
P +61 3 9245 1247
F +61 3 9646 9814
ICQ UIN 13107913
-----Original Message-----
From: Strange Tactics [mailto:[EMAIL PROTECTED]]
Sent: Saturday, 24 March 2001 5:10 AM
To: Fusebox
Subject: RE: Musings on Attributes (was Best Practices...)
I'll throw a vote in for [Is "attributes." to hard to type?], I changed
fuseaction to fa for that reason, I would love to change attributes to "att"
Shane Johnson
www.strangetactics.com
[EMAIL PROTECTED]
Coldfusion developer
Fusebox compliant (XFB)
-----Original Message-----
From: Steve Nelson [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 23, 2001 8:05 AM
To: Fusebox
Subject: Re: Musings on Attributes (was Best Practices...)
That loses the advantage of search engine safe URLs and makes custom
tags harder to deal with.
Let me bring up the question again.... What problem are we trying to
solve?
Is <cf_formurl2attributes> processing too slow?
Is "attributes." to hard to type?
Does the attributes scope break something?
Are we bored?
Steve Nelson
Try my CFML code tester for free!
http://www.secretagents.com/tools/stomp/
(804) 825-6093
Patrick McElhaney wrote:
>
> I've put a lot of thought into it, and have come to the conclusion
> that we don't need attributes.
>
> The idea behind "attributes" is this: We combine all of the scopes
> into one so we don't have to specify the scope a variable originated
> from. But that's no big deal, because Cold Fusion does that anyway.
>
> If you leave out the scope, CF checks all of the following scopes in
> the specified order:
> 1. Local variables created using CFSET and CFQUERY
> 2. CGI variables
> 3. File variables
> 4. URL variables
> 5. Form variables
> 6. Cookie variables
> 7. Client variables
>
> The only problem I see with this is if you want to use fusebox as a
> custom tag, you can only access the parameters passed through the
> attributes scope. The designers of Fusebox decided to tackle this
> problem by putting *everything* in the attributes scope, whether
> the circuit is being called as a custom tag or not.
>
> It seems to me that it would be easier to go the opposite direction,
> by copying all attributes scoped variables to locally scoped
> variables. But then you run into encapsulation problems. Local
> variables in the calling template aren't available to custom tags,
> but URL & FORM variables are. Still not a major problem because
> FORM and URL variables will never override a variable scoped
> locally within a custom tag.
>
> The only problem is if I want to check for the existence of a
> local variable. The variable may be present in the form scope, but
> not the local scope, causing my isDefined("") function returns true
> where I expect it to be false. The same problem happens with CFPARAM.
>
> However, I've done some reasearch and found a workaround for that.
> Cold Fusion has a default scope for local variables (called "Variables")
> and that's the first scope in the list that it checks. So if I
> write <cfset x = 1>, CF interprets that as <cfset varibables.x = 1>.
> And I can verify that a variable exists in the local scope by
> checking 'variables.x' instead of just 'x'.
>
> In order to make this work properly, we would need to make sure all of
> our FROM, URL, and ATTRIBUTES variables are copied to the "variables"
> scope (CF_FormURL2Variables?), but we could leave off the scope when
> referring to our variables, except when we are checking for their
> existence.
>
> Patrick
>
>
>
> Patrick
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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