Re: [Zope] dtml-in variables not available to called methods?
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
I'm with you on this one Tres - I've been through the same loop as Chris and others in this thread. Michel - how about setting up an 'enhancement requests' forum on zope.org where we can post these ideas for DC and others to comment/act on ? Cheers Richard At 14:26 21/03/00 -0600, you wrote:
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
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Richard Moon richard@dcs.co.uk
participants (2)
-
Richard Moon -
Tres Seaver