[Zope] increment value of self

Peter Sabaini sabaini@inode.at
Wed, 11 Dec 2002 23:37:16 +0000


Use manage_changeProperties() instead

Details: lib/python/OFS/PropertyManager.py

cheers,
peter.

Davis Marques wrote:
> I’m having a lot of problems with this one … I have an object (A) that 
> has a method called increment, and a variable in the Basic propertysheet 
> called count.  I’d like other objects to be able to call that method, so 
> that the A object increments the value of count + 1 when requested.
> 
>  
> 
> The problem I’m having is that any other variables present in REQUEST 
> are then also assigned to A.
> 
>  
> 
> Here’s what I have so far:
> 
>  
> 
> “””
> 
> increment
> 
> “””
> 
>  
> 
> c = context.count + 1
> 
> context.REQUEST.set(‘count’,c)
> 
> context.propertysheets.Basic.manage_editProperties(context.REQUEST)
> 
>  
>