[Zope] Creating CatalogAware products.

Adam Summers adam@centurysoftware.com.au
Thu, 12 Sep 2002 09:35:35 +0800


Hi all,

First time poster, long time lurker..

Ive been trying to create a product which is CatalogAware, with only 
some success.

* I have a ZCatalog in the root of the zope installation called 'Catalog'

* The class for the product inherits/mixes like thus:

class myProduct(OFS.SimpleItem.Item, Persistent,.... 
Products.ZCatalog.CatalogAwareness.CatalogAware):

* In the __init__ method, I have : self.index_object()

* In any method which modifies any of the fields that are used as 
indexes in the catalog I also have: self.index_object()

My problem is, The products will not add/delete themselves from the 
catalog, but when I modify the item, the catalog is updated. What am I 
missing about this?

Regards,
Adam