[Zope-dev] RE: Subclassing

Brian Lloyd Brian@digicool.com
Mon, 12 Jul 1999 13:25:38 -0400


> Zopists,
> 
> I noticed a post in the list a while back about Subclassing.  In order
> to make a ZClass inherit from a Base ZClass like lets say a "Findable"
> :) base class.  Then I have to put all of the ZClasses that I want to
> decend from Findable inside the Findable ZClass.  Since they 
> don't show
> up in the "Add ZClass" interface.  Won't this means that the Findable
> ZClass will be very fat indeed?  I'm probably misinterpreting the
> Subclass issue.  
> 
> All my best,
> 
> Jason Spisak

A ZClass doesn't need to be contained in another ZClass
in order to inherit from it. For example, let's say you
create a Product called "SpamCan". Inside of SpamCan,
you can create a "Findable" ZClass. After adding that,
you can create a "SpamCan" ZClass and "Findable" should
show up in the list of possible base classes when you
define SpamCan. It should also show up in the bases list
if you try to create more ZClasses _inside_ of the SpamCan
class.

Hope this helps!


Brian Lloyd        brian@digicool.com
Software Engineer  540.371.6909              
Digital Creations  http://www.digicool.com