You are not logged in Log in Join
You are here: Home » Members » Drew » Tips from the Mail List » HoldOnToYourButts, and see the details. » tip_view

Log in
Name

Password

 

Created by ZopeOrgSite . Last modified 2000-10-16 07:04:25.

It is possible, but only from python, and it is a *real* hack. Doing this is completely unsupported. Michel might get shot for revealing the technique. Given a Product called 'YourProduct' that contains a Zclass called 'YourZClass' that you want to 'rebase', first, create a temporary ZClass called 'TempZClass' in the same product. 'TempZClass' should be built with the new order or types of subclasses that you want 'YourZClass' to have. Note that 'TempZClass' need not have anything in it, it just needs to subclass the right classes. Shut down Zope, run python1.5.2 in your lib/python directory, and execute the following code:
$ cd lib/python  
$ python        
>>> import Zope 
>>> p = Zope.app().Control_Panel.Products.YourProduct #
>>> p
>>> p.YourZClass._setBasesHoldOnToYourButts(p.TempZClass._zbases[1:]) >>> get_transaction().commit()