[Zope-dev] More comments on ZPatterns

Steve Alexander steve@cat-box.net
Sun, 09 Jul 2000 19:23:25 +0100


Steve Spicklemire wrote:
> 
> I just want to make sure I understand... is the intention that property management
> needs to be done on each instance separately? So if I add a new property to one
> of my property sheets, I need to somehow update the propertysheets of each of the
> instances? Also.... if I need to create propertysheets for each instance... where
> should that be done? I suppose it makes sense to put that in the Specialist that
> handles the object that gets the properties?...no?

No need for all that.

Your instances are DataSkins, and they get their PropertySheets via an
InjectionFolder.

All you need to do is tell a DataManager that is in an appropriate
InjectionFolder that it should handle DataSkins of whatever meta_type
your instances have. Furthermore, configure this DataManager to provide
the PropertySheets you want, with sensible default values, and suddenly,
all your instances suport this propertysheet.

An "appropriate InjectionFolder" is one that lies in the acquisition
path of your instances.

[postscript: I only realized this stuff a couple of days ago, when I
started using ZPatterns on a project :-) ]

--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net