[Zope] Dataskin Zclass + Folder subclassing problem

Jean Lagarde jean.lagarde@eer-rc.com
Wed, 28 Nov 2001 07:20:19 -0800


Hmm, it seems I have maybe posted the first copy of this message to
zope-dev in error; Danny William Adair went over the role of the two
lists in a recent message, and did so more clearly than what I read at
zope.org (http://www.zope.org/Resources/MailingLists). From the
descriptions found there, I thought that my problem fell somewhere in
between ;-) In that page, maybe "including basic programming and so
forth" could be replaced with something like "from basic to complex
programming", and "A separate list for Zope developers" with "... for
developers of Zope". That might have sent me to the correct list in the
first place (I did read these descriptions before posting, and I hope
that others do).

Anyway, on to the subject of this message: I have posted this yesterday
to zope-dev and repeat it here in the right place.

Hi all,

A ZClass inheriting from both DataSkin and Folder seems to work as
expected (so much has been discussed in other messages, at least with
ObjectManager). However, instead of inheriting directly from DataSkin, I
want to inherit from another Zclass which is itself based on DataSkin,
i.e. (not showing Zobjects):

         DataSkin          ZClass1    Folder
            |                 \         / 
            |                  \       /
            v                   v     v
         ZClass1                ZClass2

After its creation, the new Zclass ZClass2 seems to have some management
issues: 

- The views are initialized to those of ZClass1; no big deal, for now, I
just added a new view tab named Contents for manage_main

- When I create an instance of ZClass2 (in a Folder w/Customizer
Support), the instance does show its Contents tab, but it does not quite
know it's folderish:

  - It does not show in the left pane of the ZMI

  - If I add an object from the contents tab interface of the instance,
say a dtml method, it adds OK, but does not show in the contents tab
(the contents view is always empty no matter what I add)

  - The objects I added are there; I can traverse to them and their
management interfaces, and I have also checked the ZODB directly using
the wonderful pyTree.py.

I'm afraid that I know just enough about Zope to be dangerous ;-) I
basically just have the time to learn about the stuff that I need to get
the job done, and I'm sure that the current version of what I'm working
on will need some refactoring later on. So I have two questions:

1) Anybody can think of a quick fix to get the folderish behavior
working as it should?

2) In its current state (if there is no quick fix), ZClass2 seems usable
enough for my needs; I just need to add a couple of objects for each
instance, and I can reach their management screens through explicit
traversal. So I'm tempted to plug along and keep on experimenting with
that setup for now. Any other more important consequences that I'm
missing that should have me fix this more adequately before I proceed?

Cheers,

Jean