[Zope3-Users] Anyone had any success with ZCatalog in Zope 3?

Johan Carlsson johanc at easypublisher.com
Mon Nov 21 09:38:43 EST 2005


Dominik Huber wrote:
> 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

That seemed resonablu, unfortunately it didn't help.

Thanks anyway,
Johan


-- 
Johan Carlsson          Tel: + 46 8 31 24 94
Colliberty              Mob: + 46 70 558 25 24
Torsgatan 72            Email: johanc at easypublisher.com
SE-113 37 STOCKHOLM


More information about the Zope3-users mailing list