Hi! Is there really no way for an object to know wether a call to manage_beforeDelete is the result of a delete or a move operation? I've tried to override _notifyOfCopyTo and setting an internal variable based on the op parameter, but alas it's not called when moving the parent... I have another class of objects which must not be cloned (sitewide unique) and I have overridden _CanCopy to avoid this, but again it's simply ignored when the parent is cloned... Any suggestions? Tom
To prevent copying from above, maybe you could have a manage_afterClone method that raises an exception. Florent Tom Bech <tomb@ii.uib.no> wrote:
Hi!
Is there really no way for an object to know wether a call to manage_beforeDelete is the result of a delete or a move operation?
I've tried to override _notifyOfCopyTo and setting an internal variable based on the op parameter, but alas it's not called when moving the parent...
I have another class of objects which must not be cloned (sitewide unique) and I have overridden _CanCopy to avoid this, but again it's simply ignored when the parent is cloned...
Any suggestions?
Tom -- Florent Guillaume, Nuxeo (Paris, France) +33 1 40 33 79 10 http://nuxeo.com mailto:fg@nuxeo.com
Hi, I want to transmit the data of a (probably large) Pdata object (Zope module OSF/Image) over a TCP/IP socket using sock.send(). Is there a stream-like wrapper class for Pdata in Zope? Any thoughts? Niels
I think you're going to need to roll your own here... I know of no wrapper class for pdata that makes it appear to be streamlike... Sorry, - C ----- Original Message ----- From: "Niels Mache" <mache@struktur.de> Cc: <zope-dev@zope.org> Sent: Friday, January 04, 2002 11:41 AM Subject: [Zope-dev] File/stream like Pdata class in Zope?
Hi,
I want to transmit the data of a (probably large) Pdata object (Zope module OSF/Image) over a TCP/IP socket using sock.send(). Is there a stream-like wrapper class for Pdata in Zope?
Any thoughts?
Niels
_______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org 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 )
On Fri, 04 Jan 2002 17:41:08 +0100, Niels Mache <mache@struktur.de> wrote:
I want to transmit the data of a (probably large) Pdata object (Zope module OSF/Image) over a TCP/IP socket using sock.send().
I assume you mean *not* using http. Do you *need* that to be blocking? I thought I needed something similar at one time too, but the non-blocking options are probabnly better. If you want non-blocking, File objects use RESPONSE.write which is a good start for rolling your own implementation. Toby Dickenson tdickenson@geminidataloggers.com
Tom Bech writes:
Is there really no way for an object to know wether a call to manage_beforeDelete is the result of a delete or a move operation? I do not think so because Zope implements moving by copying and deleting.
Dieter
participants (6)
-
Chris McDonough -
Dieter Maurer -
Florent Guillaume -
Niels Mache -
Toby Dickenson -
Tom Bech