At 23:14 2002-10-08 +0200, Maik Jablonski wrote:
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.
Yes, also be careful with your base classes. You need to inherit the Persistance class which is included in OFS.Folder and ObjectManager and SimpleItem. Peter
cheers, maik
-- Maik Jablonski __o www.zfl.uni-bielefeld.de _ \<_ Deutsche Zope User Group Bielefeld, Germany (_)/(_) www.dzug.org
_______________________________________________ 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 )
--- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.391 / Virus Database: 222 - Release Date: 2002-09-19
--- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.391 / Virus Database: 222 - Release Date: 2002-09-19