[Zope] Re: Refreshing products

Peter Bengtsson mail@peterbe.com
Wed, 09 Oct 2002 00:47:58 +0100


--=======3A895D77=======
Content-Type: text/plain; x-avg-checked=avg-ok-5D9B2CD4; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 8bit

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

--=======3A895D77=======
Content-Type: text/plain; charset=us-ascii; x-avg=cert; x-avg-checked=avg-ok-5D9B2CD4
Content-Disposition: inline


---
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

--=======3A895D77=======--