[Zope-dev] Folderish objects and multiple inheritance

Andy McKay andym@ActiveState.com
Tue, 5 Sep 2000 11:35:21 -0700


Hi there,

Ok so I have a class that has multiple inheritance. My main class (A) works
fine, but I wanted to add in folderish properties. The problem is the order
of multiple inheritance and viewing folder objects. When you view a folder
from you call index_html and this gives a content list.

By inheriting this way:

class B(A, Folder):

I have kept all my A methods. However viewing it does not produce the
content list since its overwritten by A. Of course inheriting:

class B(Folder, A):

Does work for that, but breaks all my other methods.

Solutions:

Well I tried defining a tab - view_folder which was something along the line
of:

def view_folder(self, client=None, REQUEST={}):
    ''' doc string '''
    return Folder(self, client, REQUEST)

But get an attribute error on manage_tabs.

Any ideas?

Thanks.

--
  Andy McKay, Developer.
  ActiveState.