[Zope] manage_afterAdd - need enlightenment

Aleksander Salwa ololo@zeus.polsl.gliwice.pl
Mon, 11 Sep 2000 23:08:37 +0200 (CEST)


I decided to convert my ZClasses to CatalogAware. I added CatalogAware as
first base class.
If I add <dtml-call "index_object()"> in my MyZClass_add method, then
new object is automatically indexed as expected.
But in CatalogAwareness.py I see method manage_afterAdd, which does the
same. Is this method called automatically (probably not), or have I to
call it - where, what arguments ? I tried to call it after call to _add
method - I got strange error:
Error Type:  AttributeError
Error Value: _u
This ZClass base classes are CatalogAware and DTMLDocument.
Without mentioned call to "index_object", object is not indexed.

I need some enlightenment on manage_afterAdd - how (and why) to use it,
and CatalogAware in general :)

Of course, I can put "index_object()" in every _add method, but probably
it's not the right way of doing things.

ololo@zeus.polsl.gliwice.pl

/--------------------------------------\
| `long long long' is too long for GCC |
\--------------------------------------/