[Zope] the neverending constructors

Marco Mariani m.mariani@imola.nettuno.it
Wed, 9 May 2001 14:13:51 +0200


Hi!

I'm writing a product which is instantiated through a wizard, made by
a sequence of HTML forms.

Each form is a method, so I must declare them (and the methods called
by them, and so on) to assign the permissions. It becomes:


    context.registerClass(
        ZopeCA,
        constructors = (
            ZopeCA.addWizard,   # the first method is called when someone
                                # uses the pulldown menu
            ZopeCA.addWizard1,
            ZopeCA.addWizard_cert,
            ZopeCA.addWizard_key,
            ZopeCA.addWizard_x520,
            ZopeCA.addWizard_extensions,
            ZopeCA.manage_addCA,
            ZopeCA.set_dbconnection,
            ZopeCA.error,
            ZopeCA.countrylist,
            ZopeCA.rsa_filter_save,
            ZopeCA.rsa_filter_load,
            ZopeCA.sscert_save,
            ZopeCA.dateForm,
        )
    )


or even longer.

Is there a way to avoid declaring everything under the sun? Other products
are set up by a single form, but mine is quite complex (it needs to create
a self-signed certificate, amongst other things)

Thanks.