jonatan wrote:
On Tue, 2003-02-04 at 17:01, AM wrote:
page 2 if viewed in both cases should give a key error because var1 or var2 are not in its namespace. but both the approaches should work when viewing page1 ( I just tested that ).
in the second case, i passed var2, so why shouldn't it work? :)
what I meant was that if page2 is viewed as is, then you would get an error because there is no definition of var1/2 on page two, but when you view page1 which has page2 embedded in it, there shouldnt be any errors.
btw, if i call z sql functions this way:
<dtml-call expr="REQUEST.set('param1','1st parameter')"> <dtml-call expr="REQUEST.set('param2','2nd parameter')"> <dtml-call sqlDoSomething>
ideally it should.
then it works, and if i was calling a dtml method instead of an sql one, then it doesnt.
is this the way it should go?
if this is, how can i access parent's namespace (values set by REQUEST.set, etc) ?
Could you please provide the error traceback, which should be on the page if you are running 2.5.x or in the error_log if you are running 2.6
i got confused now. :) so whats the normal behaviour?
which traceback should i post? the first or second one? page1 or page2?
whereever you get the key error... the key error should not appear for page1 and on page 2 there should be an attribute error. so whereever you get a KEY error just include that hth AM
AM
thanks for your help,
jonatan
jonatan wrote:
i have two functions: page1 and page2
page1 contains:
<dtml-call expr="REQUEST.set('var1','do not work')"> <dtml-var page2>
page2:
<dtml-var REQUEST> <dtml-var var1>
this makes a KeyError for both ....
and if i say <dtml-var expr="page2(var2='hey there')">
and in page2:
<dtml-var var2>
then this works ...
how's all this? how can i access the caller's namespace?
thanks for the help,
jonatan
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
-- ================================================================== Aseem Mohanty Neurobehavioral Systems Inc, 828 San Pablo Ave, Albany, CA 94706 (R) 510 7696011 (M) 510 3014871 (O) 510 5279231 ================================================================== "I saw `cout' being shifted "Hello world" times to the left and stopped right there!!" -- Steve Gonedes ==================================================================