[Zope3-Users] Sending object modified event on FTP upload - best practice?

Jeff Shell eucci.group at gmail.com
Thu Jul 28 10:58:06 EDT 2005


On 7/28/05, Jim Fulton <jim at zope.com> wrote:
> Jeff Shell wrote:
> > In looking at how FTP support is written in zope.app.ftp, I notice
> > that ObjectCreatedEvent notifications are sent off when new objects
> > are created. But when zope.app.ftp.FTPView._overwrite(...) is used to
> > write to an existing object via an IWriteFile adapter, the FTP View
> > does not send an object modified event.
> >
> > I'm assuming that it's the responsibility of my IWriteFile adapter to
> > send notifications of this event?
> 
> Yes.
> 
>  > Or is this something that should be
> > in the FTPView's implementation?
> 
> No.  The FTPView isn't actually modifying the object, the IWriteFile
> viw is.  It's possible that the write-file adapter could be modifying
> a different object than the one it adapts.

Excellent. That's what I thought, but I wanted to ensure I understood
the ethics of event notifications correctly. Thanks!

--
Jeff Shell


More information about the Zope3-users mailing list