"Phillip J. Eby" wrote:
At 10:02 AM 7/10/00 -0400, Shane Hathaway wrote:
Phillip,
What if the management interface for specialists provided a way to manipulate, or at least view, the table of virtual objects (or, in ZPatterns-speak, DataSkins)? Wouldn't that make ZPatterns more accessible?
Probably. The sticking points are twofold, however. 1) I'm not sure what a default for such an interface would look like, and so am holding off until Ty and I have built a couple of ones for "real life" use. 2) I need a good way to make the methods overrideable without any subclassing (whether in Python or ZClasses), since Specialists "want to be singletons". I have an idea about how to make Specialist and similar ObjectManagers able to permit adding of attributes that they already have, so long as it's a *class* attribute and not a manage_* method, but I haven't had time to implement it yet. If ObjectManagers did this themselves (wink wink, nudge nudge) it would lift a lot of restrictions I'm currently holding to with regard to default interfaces on Specialists, Racks, UserSources, etc., because then users could override them at a whim.
I decided to try out this idea. It turned out to be a cinch! It doesn't restrict the manage_* methods yet; I'll get to that after I get some feedback. Thoroughly untested except on my box; use at your own risk, etc. :-) http://www.zope.org/Members/hathawsh/ConfigurableInstances/
I think this may relate to an existing interest of yours regarding specification of interfaces and overriding them in instances; I'd be interested in hearing your comments regardless.
The thing that's really missing is the interface that DatabaseConnector provides. It shows you all the methods you need to implement, and when you're done, the interface is ready to try out. This leads to a sense of completion, which in turn makes the user pleased to be using Zope/ZClasses/ZPatterns/etc. This can only be good. Shane