Get a handle to the object where you wish to create the object then create the object. For example: newobj = getattr(self, 'folderA') will give you folderA in self. The new object will be created in folderA. -- Andy McKay, Developer, ActiveState http://www.ActiveState.com Programming for the People ----- Original Message ----- From: "Francois-Regis CHALAOUX" <Francois-Regis.CHALAOUX@sanofi-synthelabo.com> To: "Receipt Notification Requested" <zope@zope.org> Sent: Thursday, August 17, 2000 6:36 AM Subject: [Zope] Choose where to create a ZClass instance with EM
Hi,
When I create a ZClass instance from an external Method I create by default the instance in the same place where is located my external method (see the code below).
How to select a different place in my script where will be create the ZClass ?
==== Code ====
def addZClass(self,id,data): newob=self.Control.Panel.Products.MyProduct.MyClass(id) newob.id=id newob.propertysheets.Properties.manage_changeProperties(data) self._setObject(id,newob) newob.reindex_object()
Bye, FR.
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )