[Zope-dev] Re: using ZClasses as DA brains?
Anthony Baxter
Anthony Baxter <anthony@interlink.com.au>
Wed, 15 Dec 1999 12:59:35 +1100
>>> Anthony Baxter wrote
> Has anyone figured out the necessary magic to get the ZClass-as-brains
> from the current CVS to work?
>
> It seems like the 'advanced' tab needs 'manage_product_zclass_info'
> which is in Shared/DC/ZRDB/DA.py - but I'm stuffed if I can figure
> out how this is meant to work...
Ah, figured it out. You have to have ZClasses created that don't derive
from the Persistent base classes - the ZClass interface now includes this.
Unfortunately the fix to ZClass.py:1.37 to copy manage_options from the
base class fails if you create a ZClass that derives from nothing at all.
I wrapped the copy operation in an if zope_object: test (not sure that this
is the best approach, a better one might be to test for manage_options
being there at all) and it's happier...
Anthony