Re: [Zope] REQUEST.set('n', n+1) broken on zope.org

2000-12-04 Thread Richard Jones

Dieter Maurer wrote:
> 
> Richard Jones writes:
>  > As the subject says, REQUEST.set('n', n+1) is broken on zope.org. The
>  > following DTML will raise an AttributeError on __add__:
>  >
>  > 
>  > 
> There may be a simple explanation
> (someone else already pointed out, that you need to use "...";
> I expect, you did as otherwise, you would get a "KeyError"):

Yeah, sorry my example code was wrong.


>   There may be an object named "n" somewhere in the
>   acquisition context. An object that does not define
>   an "__add__" method.
> 
> As you probably know (or can reread in the documentation),
> "REQUEST" has quite a low priority for lookups
> (in fact, it is at the bottom of the acquisition context).
> It is therefore easy to have a REQUEST definition overridden.
> Use "REQUEST['n']+1" instead of "n+1".

  This fixed the problem, thanks. I'm only just getting back into Zope,
and I suppose acquisition hadda bite me at least once :)


 Richard

-- 
Richard Jones
[EMAIL PROTECTED]
Senior Software Developer, Bizar Software (www.bizarsoftware.com.au)

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] REQUEST.set('n', n+1) broken on zope.org

2000-12-04 Thread Dieter Maurer

Richard Jones writes:
 > As the subject says, REQUEST.set('n', n+1) is broken on zope.org. The
 > following DTML will raise an AttributeError on __add__:
 > 
 > 
 > 
There may be a simple explanation
(someone else already pointed out, that you need to use "...";
I expect, you did as otherwise, you would get a "KeyError"):

  There may be an object named "n" somewhere in the
  acquisition context. An object that does not define
  an "__add__" method.

As you probably know (or can reread in the documentation),
"REQUEST" has quite a low priority for lookups
(in fact, it is at the bottom of the acquisition context).
It is therefore easy to have a REQUEST definition overridden.
Use "REQUEST['n']+1" instead of "n+1".



Dieter

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] REQUEST.set('n', n+1) broken on zope.org

2000-12-04 Thread Pavel V. Piankov

Maybe you should try this with the ""

ie




regards.
-- 
Pavel
Cosmos-Mebel, JSC.   
http://www.cosmos-mebel.spb.ru
- Original Message - 
From: "Richard Jones" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: 5 ??? 2000 ?. 9:16
Subject: [Zope] REQUEST.set('n', n+1) broken on zope.org


> As the subject says, REQUEST.set('n', n+1) is broken on zope.org. The
> following DTML will raise an AttributeError on __add__:
> 
> 
> 
> 
> Is this a permanent change and is this going into the Zope codebase?
> 
> 
> Richard
> 
> -- 
> Richard Jones
> [EMAIL PROTECTED]
> Senior Software Developer, Bizar Software
> www.bizarsoftware.com.au
> 
> ___
> Zope maillist  -  [EMAIL PROTECTED]
> 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  -  [EMAIL PROTECTED]
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 )