[Zope] Can't add objects to Folder-like product

Jesper Holmberg jesper.holmberg@enst-bretagne.fr
Sun, 11 Nov 2001 18:00:40 +0100


Hi All,

I'm trying to create some simple products. One of them starts like this:

# Parsing.py
from OFS.SimpleItem import Item
from OFS.Folder import Folder
from xml.dom import minidom
from Products.Step import Step
from AccessControl import ClassSecurityInfo
from Globals import InitializeClass
from Acquisition import Implicit
from Globals import Persistent
from AccessControl.Role import RoleManager

class Parsing(Folder, Implicit, Persistent, RoleManager):
        -- Here comes the rest of the class --

I can create new objects of type Parsing. These objects also know that
they are folders, so I can (through the web interface) put new objects
within them.

However, when I try to do this in my Python code, the troubles begin. I
have this line in Parsing.py:

self.manage_addProduct['OFSP'].manage_addFolder(name, title="")


This gives the errors:

Error Type: AttributeError
Error Value: _getProducts

with the backtrace:

File /usr/lib/zope/lib/python/Products/Parsing/Parsing.py, line 74, in do_Steps
      (Object: ParseXML)
    File /usr/lib/zope/lib/python/App/FactoryDispatcher.py, line 99, in __getitem__
    File /usr/lib/zope/lib/python/App/FactoryDispatcher.py, line 102, in __bobo_traverse__
  AttributeError: (see above)

  
I've tried to change everything I can think of, rereading the
documentation a thousand times, but now I'm at a complete loss. Could
someone please tell me what I could try next. Also, if I've provided too
little information, please tell me what you'd need, and I'll be happy to
provide it.

Jesper

	       
-- 
          Jesper Holmberg            |"But how can |
  jesper.holmberg@enst-bretagne.fr   | one be warm |
ENST Br, BP 832, 29285 Brest, FRANCE | alone?"     |