[Zope-dev] More comments on ZPatterns

Chris Withers chrisw@nipltd.com
Tue, 18 Jul 2000 22:13:37 +0100


"Phillip J. Eby" wrote:
> The other comment I have, now that I've seen your approach, is
> that it might be more flexible from a subclassing perspective, to use a
> __replaceable__ attribute.  Here's how it could work:
> 
> 1) Configurable._checkId() checks to see if the existing attribute to be
> replaced has a __replaceable__ = true attribute, or if it lacks a
> __replaceable__ attribute, it checks the objectmanager itself for a
> subobjectname__replaceable__ attribute.
> 
> 2) The Configurables ZClass mixin UI would set/reset
> subobject.__replaceable__ on the list of names given (and in the case of
> attribute errors would set/reset class.subobjectname__replaceable__
> 
> The advantage to this approach is that if you create mixin classes that are
> designed to be added to Configurables, you don't have to go and re-check
> your configurability list; the replacability lives with the methods, not
> the class.

Don't quite all fo this but it sounds like exactly what I'm after :-)

I'll third it long after the thread is closed too in the hope that Shane
can get this into the Zope core... Would a collector entry help?

cheers,

Chris