[Zope-dev] Subclassing ZObjectManager in ZClasses
Fri, 31 Mar 2000 16:57:05 +0200
[This message was 1st posted 2 weeks ago on the main zope list.]
I've been playing with ZClasses and I ran into an issue with ZObjectManager.
Summary: (when creating a folderish ZClass and cascading base classes) if
ZObjectManager isn't subclassed at 1st level, objects can be added to the
folderish ZClass instances but they don't show in the manage_main object list.
[Zope 2.1.4 on Win32, pure ZClasses, no Python around]
1) I first tried this simple setup. It worked fine:
MyTestClass is folderish and works as expected.
2) This setup worked fine too:
I can create a custom base class and use it in several ZClasses. They are
folderish and work as expected.
3) Then I tried this setup:
Here I first created MyBaseClass, then I subclassed it together with
ZObjectManager when creating MyTestClass.
MyTestClass looked OK; I created a Content view linked to manage_main; I
allowed adding standard object types such as Folder and File.
However, when I add objects in an instance of MyTestClass they do not show
in the object list (Content view). I *think* they are actually added
because I cannot add an additional one with the same ID: I get an "ID
already in use" error.
When testing further I got the same results when CatalogAware and
Renderable were not around. Same results too when subclassing Folder instead.
It's not that bad, but I can't create a standard base class, then use it to
create a folderish variant.
Does anyone understand why?