[Zope-dev] More useful CatalogAware class?
Dieter Maurer
dieter@handshake.de
Tue, 13 Jun 2000 23:08:58 +0200 (CEST)
Martijn Pieters writes:
> On Mon, Jun 12, 2000 at 01:12:33PM -0700, Michel Pelletier wrote:
> > ... CatalogAware successor ...
>
> Very interesting indeed.
>
> Is the CatalogAware mixin in the future going to move towards Tres' Observable
> pattern?
>
> After initial notification of the set of catalogs (or other interested
> objects, or a generic notification manager) at creation time, the object will
> only have to call the 'notify' method, with the appropriate event name. In
> fact, I think all stock Zope objects should in the nearby future use the
> Observable pattern to advertise events like this.
If one views "creation" and "deletion" as operations on the container
rather than the element then the observer pattern can be used
for creation and deletion, too.
Of cause, the notification should contain a reference to
the created/deleted object.
Dieter