[Zope] Missing attributes while pasting objects...

FLORAC Thierry thierry.florac at onf.fr
Mon Oct 4 12:28:26 EDT 2004


  Hi,

I have a problem with Zope-2.6.1, which I'll try to describe below...
I have several classes, in several Python products, with several custom
properties :


  class MyFolder (ObjectManager):
    _properties = ({'id':'title',    'type':'string', 'mode':'w'},
                   {'id':'oid',      'type':'string', 'mode':''},
                   {'id':'template', 'type':'string', 'mode':'w'})

  class MyClass (SimpleItem):
    _properties = ({'id':'title',    'type':'string', 'mode':'w'},
                   {'id':'oid',      'type':'string', 'mode':''},
                   ...)

  class MySubClass (MyClass):
    _properties = MyClass._properties + \
                  ({'id':'template', 'type':'string', 'mode':'w'},
                   ...)


Instances of MyClass and MySubClass are stored in instances of MyFolder.
My problem is that when I cut and paste an instance of MySubClass
from/to an instance of MyFolder, it seems that properties added to
MySubClass are lost ; and in this example, the MySubClass.template is
replaced with the value of MyFolder.template.

The "CopySource._getCopy" method which is used to get a copy of an
object while cutting/pasting is never overridden, but I think that my
added properties are already missing while calling this method...

Any help or idea will be greatly welcome...
Thanks,

  Thierry

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope/attachments/20041004/996e2f9f/attachment.htm


More information about the Zope mailing list