[Zope] Nesting ZClasses

Alexandre Ratti alex@gabuzomeu.net
Wed, 24 Nov 1999 20:46:40 +0100


Hello,


I'd like to nest ZClasses in the following way:

TestFolderClass
--- TestTopicClass
--- --- TestItemClass

Both FolderClass and TopicClass subclass ObjectManager.

The problem is that I'd like to be able to add Item instances both in Topic 
instances and directly in Folder instances. Also I'd like to nest Topics. 
The following cases should all be allowed:

TestFolder
-- TestItem1
-- TestItem2
-- TestTopic1
-- -- TestItem3
-- -- TestItem4
-- -- TestTopic3
-- -- -- TestItem5
-- TestTopic2
etc.

- If both TopicClass and ItemClass are defined at the same level (directly 
in FolderClass), I cannot nest Item in Topic (Item is not available on the 
Subobjects tab).

- If ItemClass is defined in TopicClass then I cannot add Items directly in 
TestFolders (Item is not available on FolderClass's Subobjects tab).

The only solution I can think of is creating an independant ZClass Product 
called Items. Then it will be available anywhere. But it messes up the 
Available Objects list.
Is there a better solution ?


Thanks.

Alexandre