[Zope] Creating a ZClass instance as a method of another ZClass?

Jeff K. Hoffman jkhoffman@carolina.rr.com
Fri, 10 Dec 1999 17:08:49 -0500 (EST)


On Fri, 10 Dec 1999, Tres Seaver wrote:

> I'm puzzled -- I can add ZClass instances from one of my products to ZClass
> instances from another of my products through the management interface just
> fine, on both 2.01 and 2.1.

I am not trying to add a ZClass instance from a product to a ZClass
instance of another product. I am trying to add a ZClass instance from a
product to the ZCLASS of another product; I am trying to add an instance
of BClass to the 'Methods' tab of AClass, such that 'myBClassInstance'
will be available to all instances of AClass.

Maybe this will clear it up:

  + Control_Panel
    + ProductB
      + BClass (ZClass)
        + Methods tab
          - one (DTML Method)
          - two (DTML Method)
    + ProductA
      + AClass (ZClass)
        + Methods tab
          - myBClassInstance (BClass instance)
          - index_html (DTML Method)
  + aInstance1 (AClass instance)
  + aInstance2 (AClass instance)

Thus, aInstance1 and aInstance2 both have a 'myBClassInstance' method, as
defined in the AClass ZClass (heh, isn't that a mouthful. :-))

> I can't believe that there is any functionality possible through the
> management interface which can't also be had through Python.

Neither can I. ;-) Good thing there isn't, as far as I know.

--Jeff