>- see footer for list info -<
Variables that are created within a custom tag are not accessible outside, you 
don’t have to use thistag.

Just use variables.myvar for the variable.

Regards

Alex

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Peter Boughton
Sent: 02 August 2007 20:01
To: Coldfusion Development
Subject: [CF-Dev] var-scoping in custom tags.

>- see footer for list info -<
Just want to check I'm not about to potentially create headaches for myself.

If I want to avoid the risk of variable leaking when working inside a custom
tag, I need to put all local variables inside the ThisTag scope, right?

ie, this is bad:
<cfloop index="Item" list="#Whatever#">

I need to do this instead:
<cfloop index="ThisTag.Item" list="#Whatever#">

And the only way to affect ThisTag.Item from other scripts is intentionally
(ie: using Caller scope) - it can't happen accidentily?


Thanks,

Peter


-- 
\ \
Peter Boughton
blog.bpsite.net
/ /
_______________________________________________

For details on ALL mailing lists and for joining or leaving lists, go to 
http://list.cfdeveloper.co.uk/mailman/listinfo

--
CFDeveloper Sponsors:-
>- cfdeveloper Hosting provided by www.cfmxhosting.co.uk -<
>- Lists hosted by www.Gradwell.com -<
>- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<

-- 
This message has been scanned for viruses and
dangerous content by Trusted Management Limited, and is
believed to be clean.


-- 
This message has been scanned for viruses and
dangerous content by Trusted Management Limited, and is
believed to be clean.

_______________________________________________

For details on ALL mailing lists and for joining or leaving lists, go to 
http://list.cfdeveloper.co.uk/mailman/listinfo

--
CFDeveloper Sponsors:-
>- cfdeveloper Hosting provided by www.cfmxhosting.co.uk -<
>- Lists hosted by www.Gradwell.com -<
>- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<

Reply via email to