[Zope] headache
Chris Gray
cpgray@library.uwaterloo.ca
Tue, 25 Jun 2002 14:35:17 -0400 (EDT)
Seems likely that the namespace problem would be created by calling
methods inside a ZSQL method. I believe the global namespace wouldn't get
passed in to the ZSQL method.
Chris
On Tue, 25 Jun 2002, D. Rick Anderson wrote:
> well .. I backed it up a level and it worked ok. I was calling a method
> within an sql method within a document within a document, etc... I'm
> sure it had something to do with the namespace, but now I'll never know. lol
>
> Thanks,
>
> Rick
>
>
> Kevin Teague wrote:
> > Works for Me(tm)
> >
> > I put the first two lines in a DTML Method and called them from another
> > DTML Method, and dateYear is correctly set. I'm using Zope 2.5.1.
> >
> > D. Rick Anderson wrote:
> >
> >> Arrggh. I'm stuck on somthing really simple here. I have the following
> >> statements in a method:
> >>
> >> <dtml-call "REQUEST.set('periodsplit', _.str(period).split('-'))">
> >> <dtml-call "REQUEST.set('dateYear', _.int(periodsplit[0]))">
> >>
> >> If I set the var 'period' and view it directly it works just fine
> >> (period is in the format 2002-5), but if I call it from another object
> >> (methodname(_.None, _, period='2002-11')) it errors with:
> >>
> >> global name 'periodsplit' is not defined
> >>
> >> and the error points to the second call there. How can it not be
> >> defined? I just set it?!!? Is REQUEST.set not pushing those onto the
> >> namespace when called from another object? I've never had this problem
> >> before.
> >>
> >> TIA
> >>
> >> Rick
> >>
> >>
> >>
> >> _______________________________________________
> >> 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 )
> >
> >
> >
> >
>
>
>
>
> _______________________________________________
> 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 )
>