Hi All,
I can now create BTreeFolders and add,remve items to and from it but how and
where does zope store my folders,does the id indicate the folder I'm storing in?
This is in an external method:
def test3():
f = BTreeFolder2('sufest')
f2 = BTreeFolder2('somefolder')
f3 = BTreeFolder2('somefolder2')
f._setObject(f2.id, f2)
f._setObject(f3.id, f3)
uniq_id = f.generateId()
obT = OOBStuff(uniq_id,{'a':1,'b':2})
f._setOb(uniq_id, obT)
lst = f.objectItems()
return lst
def test4():
if 'suftest' in aq_parent.objectIds():
return 'True'
class OOBStuff(BTreeFolder2):
meta_type ='OOBStuff'
def __init__(self, oid,dict_to_add):
super(OOBStuff, self).__init__(oid)
self.item = OOBTree()
self.item['Auth'] = dict_to_add
def return_Tree(self):
return self.item
Running test4 gives this error:
Error Type: AttributeError
Error Value: 'builtin_function_or_method' object has no attribute 'objectIds'
Also, how come my BTFolder didn't show up anywhere in the ZMI? I have imported
aq_base and aq_parent.
Regards,
sz
" life isn't heavy enough,it flies away and floats far above action"
Start your day with Yahoo!7 and win a Sony Bravia TV. Enter now
http://au.docs.yahoo.com/homepageset/?p1=other&p2=au&p3=tagline
_______________________________________________
Zope maillist - [email protected]
http://mail.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )