Re: [Zope] Adding another base class to an existing ZClass
Hello, Well, I did use the unsupported method several times (though I'm not brave, just lazy ;-). The process is described here: <http://lists.zope.org/pipermail/zope-dev/1999-August/001288.html> Make sure you backup your database before using it. One never knows. Alexandre At 12:00 10/01/2000 -0800, you wrote:
From: "Kevin Dangoor" <kid@kendermedia.com> To: "Chris McDonough" <chrism@digicool.com>, "Gregor" <vorlon@iglou.com> Cc: <zope@zope.org>, <stevej@parlant.com> Subject: Re: [Zope] Adding another base class to an existing ZClass Date: Mon, 10 Jan 2000 09:52:52 -0500 charset="iso-8859-1"
I have not tried the wildly unsupported method... I'm not brave enough. I have, however, used the method that Gregor describes. It is a little tedious, but it works just fine. Broken down step-by-step, I think this is what I've done:
1) Rename the old classes and their metatypes to something like MyClass2, MyType2 2) Create a new ZClass with the proper base classes. 3) Start copying and pasting your methods and such... rebuild your propertysheets. This is the tedious part. It's probably a good idea to make sure you look at every tab in the management interface to make sure you don't miss something. 4) Copy your original ZClass' class ID to the clipboard. Then change the class ID to something else. (I typically just add an extra = on the end) 5) Change the new ZClass' class ID to the one on the clipboard.
Voila! New ZClass.
I think Chris' suggestion from his next message (creating a Python base class) sounds really dandy. But, you'll probably want to use the above steps to get that base class into your existing ZClasses...
Kevin
participants (1)
-
Alexandre Ratti