[Zope] Zope and Polymorphism

Ingo Assenmacher ingo.assenmacher@post.rwth-aachen.de
Tue, 08 Feb 2000 11:17:44 +0100 (MET)


Hi!

Since Zope is based on an OO-DB and you can add and edit objects in an
intuitive manner, there is a question which does I simply can not figure out:

You can inherit methods and attributes from other objects (even multiplie
inheritance), but do these objects behave like their parents in respect to
identification?

To illustrate my problem:


UploadFolder inherits Folder

<dtml-in "objectValues(['Folder'])">
[...]
</dtml-in>

Imagine I have several Folders together with some UploadFolders in one Folder
container. The above code would simply enumerate over "real" Folders, would it
not?

There are two questions:

* maybe "objectValues" is the wrong method... which one does it?
* do I have to know the class name *explicitly*? (this would force me to
rewrite enumerations of object every time I create new classes)

Thanks for the advices.

Regards, Ingo.


------------------------------------------