Mr SZ wrote at 2008-11-27 07:09 -0800: > ... >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'
"aq_parent" obviously is the object, you have imported from "Acquisition". This is a function and obviously does not have an "objectIds". You need to apply "aq_parent" to some object to (hopefully) get an object with "objectIds". -- Dieter _______________________________________________ Zope maillist - Zope@zope.org 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 )