[Zope] Re: Refreshing products

Maik Jablonski maik.jablonski@uni-bielefeld.de
Tue, 08 Oct 2002 23:14:41 +0200


Thierry Florac wrote:
>   Hi,
> 
> I currently use Zope-2.5.1 and started to develop a new product.
> This product have internal properties which are common strings or
> integers, but also instances of internal classes which are stored in
> lists and dictionnaries.
> 
> Everythink works fine, until I restart Zope or make a 'refresh' on my
> product : then, these internal properties are lost !!
> 
> What should I do to be able to keep these properties ??

Look into the Zope Developers Guide. Making properties permanent is 
described there.

the main idea is: if you changed a internal property, do a self-assignment.

example:

self.listProperty.append('hello')

self.listProperty = self.listProperty

this will make your changes permanent.

cheers, maik

-- 
Maik Jablonski                 __o
www.zfl.uni-bielefeld.de     _ \<_    Deutsche Zope User Group
Bielefeld, Germany          (_)/(_)               www.dzug.org