Hi,

I am implementing a kind of Copy function which will strip off the sub level
of object being copied. The idea is to copy only the object marked for
copying - without the sub objects.
(For those interested: I use these objects as special kind of reference
objects  in my structure.......)

In the new copy routine I have added these lines which avoids having the sub
level created:

[ ....]

newObject = ob._getCopy(self)

for zob in newObject._objects:
   delattr(newObject, zob['id'])
newObject._objects = ()

[ ..... ]

self._setObject(newObject.id,newObject)   # add the object to the Zope
database

... delattr is the same method as used by _delOb, so I assumed this is the
safe way of doing it.
Can anyone tell me if this is not OK ? It seems to work very well ....

Best regards

Petter Enholm
Snapper as
www.snapper.no






_______________________________________________
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )

Reply via email to