[Zope-CMF] New product and meta_type and portal_catalog

Pascal Samuzeau samuzeau@oreka.com
Mon, 09 Dec 2002 08:52:37 +0100


Hi Dieter,                                                            
                                                                      
Thank you for the explanations. What I will retain will be :          
                                                                      
> CMFCatalogAware.                                                    
                                                                      
> At least it is not that clear.                                      
                                                                      
                                                                      
Yes . Indeed !!!                                                      
                                                                      
>                                                                     
>      When you write a product and inherit from different classes,   
>      Python defines the name lookup as: instance, then class,       
>      then inherited classes from left to right.                     
>      The first "manage_afterAdd" found in this way will be used.    
                                                                      
Yes, it's logical.                                                    
                                                                      
>      It is quite likely, that different inherited classes           
>      come with their own definition of "manage_afterAdd"            
>      (because they require different things after adding).          
>      In this case, your product is required to do the               
>      right thing: combine the various actions as necessary.         
                                                                      
>      In this case, the deriving class must know details about       
>      the requirements of the inherited classes and                  
>      reconcile them. This is quite normal, at least with            
>      multiple inheritance.                                          
                                                                      
Sorry, Dieter, here I will not follow you to this way. For sure, IN   
THIS CASE, I need to combine the various actions, and know about my   
inherited parents's method.                                           
                                                                      
But, specially in this case, the problem appears, just because I've   
inherited of CMFCatalogAware, coming from SkinnedFolder. In an other  
product, I will have no problem. For 2 products I will have 2 ways of 
resolution. It just sounds me that the CMFCatalogAware's              
manage_afterAdd method is not in his right place. It must be outside  
of CMFCatalogAware.                                                   
                                                                      
Sorry Dieter, but I think I will not change my opinion yet, until     
someone tells me it cannot be in an other way...                      
                                                                      
Cheers                                                                
PS                                                                    
--------------------------------------------------                    
Oreka ! Nous sommes l'internet moins cher !                           
Surfez 25% moins cher avec http://www.oreka.com