[Zope] BTreeFolder inheritance problem

Thierry Florac thierry.florac@onf.fr
16 Dec 2002 14:11:17 +0100


  Hi,

I've created a new product (for Zope-2.6), which inherit from
BTreeFolder as well as another custom product (not a container) of my
own.
When I try to add a new item in my folder, I receive an error message.
For example, 

  class MyBTreeFolder (BTreeFolder):
    def __init__ (self, id, title=None, REQUEST=None):
      ""
      self.id = id
      self.title = title
      folder = Folder (id='archives')
      set._setObject (folder.id, folder)
      ...

At runtime, I receive the following error :

  Traceback (innermost last):

    * Module ZPublisher.Publish, line 98, in publish
    * Module ZPublisher.mapply, line 88, in mapply
    * Module ZPublisher.Publish, line 39, in call_object
    * Module Products.Intraforet.MyBTreeFolder, line 428, in
manage_addMyBTreeFolder
    * Module Products.Intraforet.MyBTreeFolder, line 138, in __init__
    * Module OFS.ObjectManager, line 256, in _setObject
    * Module Products.BTreeFolder.BTreeFolder, line 187, in _setOb

  TypeError: object does not support item assignment


What does this meen ??
Thanks for any help...

  Thierry


P.S.: I've created other products inheriting from ObjectManager instead
of BTreeFolder, without any problem...

-- 
  Linux every day, keeps Dr Watson away...
  http://gpc.sourceforge.net -- http://www.ulthar.net