[Zope] headache

Kevin Teague kteague@bcgsc.bc.ca
Tue, 25 Jun 2002 11:02:25 -0700


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 )



-- 
-- Kevin Teague
    Genomics Web Developer
    BC Genome Sciences Centre
    http://www.bcgsc.ca