Eric Roby wrote:

I attempted to restrict the meta_types in the class that is represented by
dbFolder to just prodA.  In order to gain access to the prodA add form, I
had to import the prodA module into the prodB module and make the assignment
in the class that is represented by dbFolder.  At this point the single
factory method was exposed in the dbFolder as expected.  Unfortuantely, the
constructor for prodA (action of the prodA add form) could not be found.
With numerous tweakings and source searching I settled on duplicating the
constructor function for prodA in the class that is represented by dbFolder.
Now it works.

You need to import the constructor methods and the assing them to local constructor methods.

I use something similar in my "simpleProduct" where I have a base module called "mxmSimpleItem" which has 2 constructors:
manage_addForm = HTMLFile('manage_addForm', globals())

def manage_addAction(self, id=None, REQUEST=None):
 "some code"

I then have another module "mxmObjectManager" which is similar to the first. So I also need the constructor in the module. Had they only been in the class, it would not have been a problem. But I just import them and assign them like:
import mxmSimpleItem
manage_addForm = mxmSimpleItem.manage_addForm
manage_addAction = mxmSimpleItem.manage_addAction

Which is the right way to do it.

regards Max M

Zope-Dev maillist - [EMAIL PROTECTED]
** No cross posts or HTML encoding! **
(Related lists - )

Reply via email to