Johan Carlsson wrote:

....


Right after that I do this:


        catalog = Catalog()
for index_name, index_attribute, idx_if, attr_call, index_type in indexes:
            idx = index_type(index_attribute, idx_if, attr_call)
            catalog[index_name] = idx
        tools['catalog'] = catalog
        catalog_reg = UtilityRegistration('catalog', ICatalog, catalog)
        rm.addRegistration(catalog_reg)
        catalog_reg.status = ActiveStatus

change the order and it will work:

       catalog = Catalog()
       tools['catalog'] = catalog
       catalog_reg = UtilityRegistration('catalog', ICatalog, catalog)
       rm.addRegistration(catalog_reg)
       catalog_reg.status = ActiveStatus
       # add the indexes after the catalog is set to the tools
       for index_name, index_attribute, idx_if, attr_call, index_type
in indexes:
           idx = index_type(index_attribute, idx_if, attr_call)
           catalog[index_name] = idx



regards,
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
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users

Reply via email to