Michel Pelletier <michel@digicool.com> wrote:
Chris Withers wrote:
Scope. if you also did:-
<dtml-call "REQUEST.set('cid',cid)">
It would work too. The dtml-in variables are not available to sub-methods, this surprised me at first too, but, you get used to it :-)
If this is true, it's really counterintuitive and should be changed if at all possible.
This is not true.
Method A:
<dtml-with "_(bob='uncle')"> <dtml-var B> </dtml-with>
Method B:
<dtml-var bob>
_will_ print 'uncle'.
If it's specific to ZSQL methods or in otherwise confusing situations, then there's even more reason to change it...
It is specific to ZSQL Methods, they create their own fresh namespace. There may be a good reason, I can't think of one.
It seems to me that all this would require is passing the "_" namespace in place of the REQUEST when calling the ZSQLMethod -- am I missing something? Values found in the REQUEST would still be found, but would be overridden by any intermediate namespaces (e.g., from dtml-in, dtml-with, or dtml-let). -- ========================================================= Tres Seaver tseaver@palladion.com 713-523-6582 Palladion Software http://www.palladion.com