[Zope] [Ann] copyPropertySheet
Dieter Maurer
zope@zope.org
Sat, 11 Aug 2001 15:59:09 +0200
Zope's support for PropertySheets is very weak. They cannot be renamed
or copied. They can be exported but only imported if they are
empty. The reason for these restrictions: The property values are not
stored in the sheet but in the associated v_self (value self). The
persistence mechanism, on with copying, renaming and export is based,
cannot find them in the current implementation.
copyPropertySheet uses the specific PropertySheet interface to handle
property values correctly. You can use it to copy a PropertySheet
sheet into a container container and optionally give it a different
id. sheet and container can be either strings or objects. Strings are
resolved into objects with restrictedTraverse. container defaults to
the sheets container.
Download at
URL:http://www.dieter.handshake.de/pyprojects/zope
Dieter