Joost van Lawick writes:
 > ...
 > def addAccount(self, id=None, title=None, valuta=None):
 >     """
 >     Create an user Account
 >     """
 > 
 >     if not id:
 >         id = uuidgen()
 >     p = Account(id, title, valuta)
 > 1:  #self.Destination()._setObject(id, p)
 > 2:  self._setObject(id, p)
 >     return id
 > 
 > When I comment in line 1 and leave out line 2, I get an Attribute Error on
 > Destination. When line 1 is commented out and 2 goes in: Voila!
 > I can still create Account objects in the ZMI.
 > 
 > So what does the Destination() method do in construction of an
 > object?
"Destination" is a method of "FactoryDispatcher"s, the kind of
thing returned by

      "manage_addProduct[product_name]"

Apparently, you call "addAccount" with a "self" that is not
a "FactoryDispatcher".


Dieter

_______________________________________________
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )

Reply via email to