Dominik Huber wrote:
Hi Johan
Your problem is that the catalog is not locatable itself during the
addition of its indexes (-> state within the create and add method),
therefore the location of the indexes cannot be located and the
NotYetError is raised. You can move your code to an
ObjectAddedEvent-subscriber for your object.
<subscriber
for=".IYourObject zope.app.container.interfaces.IObjectAddedEvent"
handler=".addCatalogAndIndex"
/>
handler pseudo code:
def addCatalogAndIndex(obj, event):
sm = zapi.getNextSiteManager(obj)
catalog = Catalog()
addLocalUtility(sm, 'XY', ICatalog, catalog)
catalog[name] = Index(name, IAnyInterface)
I've tried this, it doesn't remove the NotYet problem though!??
Regards,
Johan
--
Johan Carlsson Tel: + 46 8 31 24 94
Colliberty Mob: + 46 70 558 25 24
Torsgatan 72 Email: [EMAIL PROTECTED]
SE-113 37 STOCKHOLM
_______________________________________________
Zope3-users mailing list
[email protected]
http://mail.zope.org/mailman/listinfo/zope3-users