ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> zope-List
zope-List
Re: [Zope] BTreeFolder inheritance problem
by Thierry Florac other posts by this author
Dec 16 2002 3:47PM messages near this date
[Zope] BTreeFolder inheritance problem | [Zope] Translate the day and Month in Dutch
On Mon, 2002-12-16 at 14:11, Thierry Florac wrote:
>  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
>  

Well... after a few additional tests, I finally managed to make my
product work correctly...
In fact, I just forgot to put 'SimpleItem' as the last inherited class
on my product, and I also forgot to call "BTreeFolder.__init__" in my
own constructor...

Thierry



_______________________________________________
Zope maillist  -  Zope@[...].org
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )
Thread:
Thierry Florac
Thierry Florac

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved