[Zope-dev] CatalogAware
Michael Bernstein
webmaven@lvcm.com
Thu, 04 Jan 2001 09:17:55 -0800
Chris Withers wrote:
>
> Erik Enge wrote:
> >
> > Are you saying that, as a general rule, inheriting from CatalogAware
> > and using index_object, reindex_object and unindex_object does not
> > work?
>
> It probably does, but if you're a catalog yourself anyway, as Squishdot
> is, it just more overhead rather than calling your own catalog_object
> and uncatalog_object methods ;-)
Aha!
You're saying that catalog_object and uncatalog_object are
methods of the catalog, so when the catalog contains the
objects directly, it's all that's neccessary, correct?
index_object, unindex_object, and reindex_object (the
CatalogAware methods) are all methods on the object to be
indexed, not methods of the catalog, as I understand. When
called, they find the nearest (acquisition-wise) ZCatalog
(named Catalog by default), and cause catalog_object and
uncatalog_object to be called on it (I'm not sure what
method reindex_object causes to be called).
So, postings would only need to be CatalogAware if you
wanted them to be able to 'live' anywhere within the Zope
heirarchy, instead of being contained directly within the
Squishdot object (which inherits from ZCatalog).
Do I have this correct?
Michael Bernstein.