RE: [Zope] Z Classes Tutorial: Rough Draft
-----Original Message----- From: Michel Pelletier [mailto:michel@digicool.com] Sent: Friday, May 07, 1999 2:47 PM To: Jordan B. Baker; Amos Latteier Cc: zope@zope.org Subject: RE: [Zope] Z Classes Tutorial: Rough Draft
A better solution is to create a Python class (in a Product) and sprinkle a little ZClass magic pixie dust in the __init__.py file to make the Python class (PClass) subclassable by a ZClass. Thus when you create your ZClass, you can specify that one of it's base classes be the PClass that you made subclassable. Now all of the PClasse's python methods are methods of the ZClass.
Forgot to mention the pixie magic. In the Products __init__.py file: import MyModule def intialize(context): context.registerBaseClass(MyModule.MyClass) -Michel
Forgot to mention the pixie magic.
In the Products __init__.py file:
import MyModule
def intialize(context):
!-----^^^ perhaps it's initialize? (unless this has something to do with 'applying the characteristic of being like an int' ;-)
context.registerBaseClass(MyModule.MyClass)
-- Ross J. Reedstrom, Ph.D., <reedstrm@rice.edu> NSBRI Research Scientist/Programmer Computer and Information Technology Institute Rice University, 6100 S. Main St., Houston, TX 77005
participants (2)
-
Michel Pelletier -
reedstrmļ¼ wallace.ece.rice.edu