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. ------------------------------------------
Hi Ingo, How about something like.... : <dtml-in objectValues> <dtml-if "_.hasattr(_['sequence-item'],'isAnObjectManager')"> blah blah blah... </dtml-if> </dtml-in> -steve -------------------------------------------------------------------------- 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.
participants (2)
-
Ingo Assenmacher -
Steve Spicklemire