Johan Carlsson wrote:
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!??
Our framework relies on that concept and it is still working ;)
Did you assert to add the catalog to the sitemanagement folder before
adding its indexes?
Dominik
begin:vcard
fn:Dominik Huber
n:Huber;Dominik
email;internet:[EMAIL PROTECTED]
tel;work:++41 56 534 77 30
x-mozilla-html:FALSE
version:2.1
end:vcard
_______________________________________________
Zope3-users mailing list
[email protected]
http://mail.zope.org/mailman/listinfo/zope3-users