[Zope-CMF] New product and meta_type and portal_catalog

Dieter Maurer dieter@handshake.de
Tue, 3 Dec 2002 21:02:53 +0100


Pascal Samuzeau writes:
 > ....
 > > Are you sure that "SkinnedFolder" is catalogued?                    
 > > If it is, its "manage_afterAdd" and "manage_beforeDelete"           
 > > will call "indexObject" and "unindexObject".                        
 > > Check for this.                                                     
 > ...
 > Yes it is.                                                            
 > I've tried two ways:                                                  
 >                                                                       
 > 1- MyProduct without manage_afterAdd                                  
 > 2- MyProduct with manage_afterAdd                                     
 >                                                                       
 > In the first one, it seems to not be catalogued, in the second one, it
 > is.                                                                   
 >                                                                       
 > Do that means I've have to take care of the catalog index by myself?  
The "manage_afterAdd/beforeDelete" handles cataloging.

You either must derive from a class (usually must be the first one)
with the right "manage_afterAdd/beforeDelete" methods
or you need to provide your own one.

Note that when you inherit from two classes both with some method "m",
then you will get at most one of these methods called.
When all of them should be called, you need to define your own
"m" that does what you want.


Apparently, the "manage_afterAdd/beforeDelete" of "SkinnedFolder"
do not handle cataloging (as you found out).


Dieter