Hi, I have developed some custom products in python and this products has their own properties. Later I need to creat new basic properties. The objects with only the initial basic properties acquire the new properties but objects tha has other properties (created in the management interface) don´t. And because in this objects the other properties has the same name that the new basic properties ever if I delete the other properties I can´t create (in the management interface) an propertie with the same name tha the propertie defined in the python product (but no propertie with this name are show in the management interface). I am using Zope 2.3.3. Thanks, Georges Baladi
Georges Baladi writes:
I have developed some custom products in python and this products has their own properties. Later I need to creat new basic properties. The objects with only the initial basic properties acquire the new properties but objects tha has other properties (created in the management interface) don´t. And because in this objects the other properties has the same name that the new basic properties ever if I delete the other properties I can´t create (in the management interface) an propertie with the same name tha the propertie defined in the python product (but no propertie with this name are show in the management interface). I am using Zope 2.3.3. This is as one would expect...
The class contains a "_properties" describing the default properties. This is a tuple. When an instance changes its properties, modification are done on a local copy (and, of course, not in the class's "_properties"). From then on, the linkage between class properties and instance properties is broken - as you described. You can use "PropertySheets" instead of "_properties". They are (a bit) more versatile but you may still experience surprises.... Dieter
participants (2)
-
Dieter Maurer -
Georges Baladi