[Zope] ZClass newbie problem...

Eric L. Walstad Eric@Walstads.net
Mon, 12 Jun 2000 21:30:58 -0700


I'm stuck. I would like to build a "shiny new ZClass" that has the following
structure:

WebSimProduct
  WebSim Class
    'Properties' Property Sheet
      string RunID
    Calc Class Object
      'Properties' Property Sheet
        PathToInputFile
        PathToWxFolder
      Results Class Object
        'Properties' Property Sheet
          float gashtg
          float elchtg
          float elcclg
          float euihtg
          float euiclg

I haven't seen anything in the Zope documentation on using Zclass instances
as members of a super class.  In other programming languages I would
instantiate default objects when the WebSim class is initialized.  That way,
to use a WebSim object, all I would need to do is instantiate one, then fill
the properties of the automatiacally-created Calc object and Results object.
However, I'm not sure how to build these default objects in Zope.

My next question is: do I have to build a bunch of products (one for the
Calc class and one for the Results class, for example)?  I can imagine this
would result in a huge number of products under the control panel if this is
the case.  I would like to have just a WebSim product and have all the other
classes defined within this product.  Does Zope work this way?  If not, how
is this class structure (or one similar) achieved?

BTW, I've read, and disected to the best of my ability, the Zope Developer's
Guide and the Searchable Job Board HowTo and Tazzzz'sss Adding ZClass
Instances Programmatically and the Zope Content Manager's Guide 'Turining an
Application into a Product.'  However none of these deals with classes that
contain custom class objects.

Thanks for the guidance (TFTG?)!

Eric.