[Zope] Product question

Loren Stafford lstaffor@dynalogic.com
Tue, 15 Aug 2000 11:59:21 -0700


From: "Daniel Rusch" <drusch@globalcrossing.com>

> I've created a product, installed it and it appears on the Product
> Management at /Control_Panel / Products list.
>
> The question is how do I get it to appear in the drop down of Available
> Objects?
>

You have to register the class it defines. If you want the class to be
subclassable by ZClasses, you also have to registerBaseClass. Here's an
example copied from the __init__.py of my Xron product:

      context.registerClass(
        XronDTMLMethod.XronDTMLMethod,
        permission = 'Add Scheduled Method',
        constructors = (
          XronDTMLMethod.manage_addXronDTMLMethodForm,
          XronDTMLMethod.manage_addXronDTMLMethod),
        icon = 'www/Event.gif')
      context.registerBaseClass(XronDTMLMethod.XronDTMLMethod)
      context.registerHelp()

-- HTH
-- Loren