[Zope] newbie question - variables?
jonatan
jonatanpelikan@freemail.hu
04 Feb 2003 20:14:45 +0100
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? :)
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>
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?
> 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 )
> >
> >
> >
> >
--
jonatan <jonatanpelikan@freemail.hu>