----- Original Message ----- 
From: "Dieter Maurer" <[EMAIL PROTECTED]>
To: "Kees de Brabander" <[EMAIL PROTECTED]>
Cc: "Jens Vagelpohl" <[EMAIL PROTECTED]>; "[Zope] Mailing List"
Sent: Friday, August 04, 2006 8:11 PM
Subject: Re: [Zope] adding product-based objects programmatically

> Kees de Brabander wrote at 2006-8-3 20:39 +0200:
> > ... adding additional objects ...
> >Thanks anyway, problem solved, even when done in the __init__ of
> >Would manage_afterAdd a more sensible place for it?
> You cannot do it in "__init__" when the object needs a correct
> acquisition chain (which is not the case in "__init__").
> This is the case, for example, when the object needs to be indexed.
> When you add further objects in "manage_afterAdd", you have to be
> aware, that "manage_afterAdd" is not only called when the object
> is initially created but also for rename/move/copy. In all those cases,
> your objects are likely to be already there. This means that you have
> explicitely to check for this case.

Googling and puzzling I became aware of that fact. Thanks for your concern.

Zope maillist  -  Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to