[z3-five] BTreeFolder with Five

Kapil Thangavelu k_vertigo at objectrealms.net
Sun Nov 12 15:23:36 CET 2006


nothing to do with five/zcml.. you should call the base class constructor  
in your init method, it setups some bookeeping data structures for btrees  
or call self._initBTrees() in your constructor directly.

On Sat, 11 Nov 2006 11:57:36 -0500, kevin7kal <plone at kevinkal.com> wrote:

> I'm trying to make a BTree Folder.  I'm assuming my zcml is correct
> because I end up with a MyBTree item in the zmi drop down list and the
> add form renders, when I press the add button I recieve 'none type
> object has no attribute keys'.   My class and interface are here
> followed by the traceback.  This is zope 2.9.4 and five 1.4.1.
> Thanks in advance for any input!
> -Kevin
>
> class MyBTree(BTreeFolder2):
>      '''A Btree folder '''
>      interface.implements(IMyBTree)
>      title=fieldproperty.FieldProperty(IMyBTree['title'])
>      def __init__(self,tmpID='',tmpTITLE=''):
>          '''pass an empty tmpID and tmpTITLE'''
<snip>
>    Module Products.BTreeFolder2.BTreeFolder2, line 366, in objectValues
>    Module Products.BTreeFolder2.BTreeFolder2, line 357, in objectIds
> AttributeError: 'NoneType' object has no attribute 'keys'


More information about the z3-five mailing list