In the following example I expected 'dbConnection' to be instantiated as a child of 'foo', but it instead is instantiated as a sibling to 'foo'. Could someone please explain what mistake I'm making or how this process works? class myClass(mxmObjectManager.mxmObjectManager): 'This is the doc string' meta_type='My New Class' def __init__(self, id='foo'): mxmObjectManager.mxmObjectManager.__init__(self, id) def manage_afterAdd(self, containter=None, content=None): self.manage_addZMySQLConnection( id='dbConnection', title = 'dbConnection', connection_string = configFile.DbConnString) Poor Yorick zope.org@pooryorick.com
Hi try like this: manage_addZMySQLConnection(self, id='dbConnection', title = 'dbConnection', connection_string = configFile.DbConnString) Dragos ----- Original Message ----- From: Poor Yorick To: zope@zope.org Sent: Saturday, March 13, 2004 1:32 AM Subject: [Zope] manage_afterAdd In the following example I expected 'dbConnection' to be instantiated as a child of 'foo', but it instead is instantiated as a sibling to 'foo'. Could someone please explain what mistake I'm making or how this process works? class myClass(mxmObjectManager.mxmObjectManager): 'This is the doc string' meta_type='My New Class' def __init__(self, id='foo'): mxmObjectManager.mxmObjectManager.__init__(self, id) def manage_afterAdd(self, containter=None, content=None): self.manage_addZMySQLConnection( id='dbConnection', title = 'dbConnection', connection_string = configFile.DbConnString) Poor Yorick zope.org@pooryorick.com ------------------------------------------------------------------------------ _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
participants (2)
-
Dragos Chirila -
Poor Yorick