[Zope] Re: increment value of self
Maik Jablonski
maik.jablonski@uni-bielefeld.de
Wed, 11 Dec 2002 23:36:01 +0100
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)
please try something like this:
context.propertysheets.Basic.manage_changeProperties({'count':context.count+1})
-mj