[Zope3-dev] manage_befroeDelete?!

Janko Hauser jh@comunit.de
Fri, 10 May 2002 14:19:31 +0200


On Fri, 10 May 2002 12:44:43 +0100
Steve Alexander <steve@cat-box.net> wrote:

> 
> I don't know that the ObjectHub is an exact match for this.
> 
> It would be easy to build a flexible and adaptable mechanism for 
> managing the deletion of contained objects.
> 
> Trivial example to illustrate the pattern:
> 
>    Having an interface IAcceptsDeleteNotification that defines the
>    method notifyBeforeDelete().
> 
>    When an item is about to be deleted from a container, the
>    container asks for an adapter from the object to be deleted,
>    adapting to IAcceptsDeleteNotification.
> 
>    The object itself can implement IAcceptsDeleteNotification, or an
>    independent adapter can be registered for particular kinds of
>    object.
> 

Ok, but I keep thinking, that this is only the technical side. This
machinerie is not triggered, if I delete the hole container. 

__Janko

-- 
i.A. Dr. Janko Hauser
Software Engineering
c o m . u n i t   G m b H
online-schmiede seit 1994

http://www.comunit.de/	mailto:jh@comunit.de
Eiffestr. 598		20537 Hamburg | Germany
Fon 040 | 21 11 05 25	Fax  040 | 21 11 05 26