Well whaddya know! Just discovered I was using ObjectManger without importing the module OFS.ObjectManger. Silly me! (Wonder why it didn't throw up an error, though.) Now things are a bit better. Objects do get added under my ProjectFolder (I know because the oMyFolder._objects has a list of them). But still the objectxxx() methods return empty tuples - so nothing shows up in the contents tab. Am working on that now. Shalabh ----- Original Message ----- From: Shalabh Chaturvedi <shalabh@pspl.co.in> To: zope <Zope@zope.org> Sent: Saturday, February 26, 2000 12:23 AM Subject: [Zope] Creating a Folderish class in Python Product
Hi all,
I am creating a new product with one class - called ProjectFolder - which needs to be 'folderish'.
So I derive my class ProjectFolder from ObjectManger and after restarting Zope I am able to create objects of class ProjectFolder.
The problem is when I add any objects under a ProjectFolder object, they get added under the ProjectFolder's parent! That is, they get added under the folder which contains the ProjectFolder object and become siblings instead of children.
Any idea what is going wrong?
I feel that my ProjectFolder objects somehow do not have full folderish capabilities and the calls for 'add some object(x)' to ProjectFolder are getting handled by methods acquired from the parent folder. As a result the object x gets added under the parent folder. What can I do? For creating 'folderish' classes isn't the ObjectManager base class enough?
Thanks in advance, Shalabh