[Zope-CMF] Globals.InitializeClass(XXXXX)

Dieter Maurer dieter@handshake.de
Tue, 29 Oct 2002 17:09:41 +0100


Pascal Samuzeau writes:
 > ...
 > In my first Product named "Product A", I have a "law", that it is like
 > : "I allow to put inside the Product A, the Product B". This have a   
 > side effect which is : " I can't have a Product B if no Product A is  
 > the father's node".                                                   
Would it be a problem, when product "B" is there but just does not 
get used?

  You could then initialize "B" with a non-"global" visibility
  and access it via an interface.

  You may look at "all_meta_types" in "OFS.ObjectManager.ObjectManager"
  to find out how to get at these products via an interface
  request.

 > I really can't pass through those laws.                               
 >                                                                       
 > It means, now :                                                       
 >                                                                       
 > 1 - Product A must be installed First                                 
 > 2 - The installation of the Product A MUST call the installation of   
 >                                       ----                            
 > the Product B.                                                        
When you want to prevent the installation of product "B", it must
not be found at a standard place (i.e. in a folder where Zope
looks for products).

In order to find out how to initialize products at non-standard places,
look at the sources in the "App" subdirectory. Search for "initialize".
That's were the products "initialize" method is called.
Emulate the things around this call to have your own product installation
and initialization.

But, I feel still sure that your request is, say, unusual...


Dieter