David Kankiewicz wrote:
create something that is CatalogAware, than have it index itself "index_object" (when being created, inside a factory I think?), now clear your catalog and use "Find Items to ZCatalog" to index the same object. Lastly try to delete the object, Zope complains can't uncatalog the object and it won't delete it.
This is in part because of unindex's EXTREMELY annoying behavior when you call it on uncataloged objects. Unindex should simply *return* an error message if its called when the the object is already uncataloged - raising an error is very annoying in a lot of cases. It makes a lot more sense, too - at the end of the unidex I want the object to be removed form the catalog. Since it alreasy isn't in the catalog, unindex should just do nothing, not raise an exception! This sould solve lots of problems I've had (I always change manage_beforeDelete in CatalogAware to do "try: self.unindex" to work around this), and for a lot of other people too. -- Itamar S.T. itamars@ibm.net