----- Original Message ----- 
From: "Dieter Maurer" <[EMAIL PROTECTED]>
To: "Kees de Brabander" <[EMAIL PROTECTED]>
Cc: "Jens Vagelpohl" <[EMAIL PROTECTED]>; "[Zope] Mailing List"
<zope@zope.org>
Sent: Thursday, August 03, 2006 7:04 PM
Subject: Re: [Zope] adding product-based objects programmatically


> Kees de Brabander wrote at 2006-8-3 16:25 +0200:
> >Huh? I included the relevant portions of my source code in my message:
> >
> >Module QuerySet.py:
> >from Query import manage_addQuery
> >class QuerySet(Folder):
> >    def __init__(self, id, title):
> >        self.id = id
> >        self.title = title
> >        self.manage_addUserFolder()
> >
> >    def manage_afterAdd(self, item, container):
> >        manage_addQuery(self, id, title)
> >
> >manage_addQuery in Query.py looks like:
> >def manage_addQuery(dispatcher, id, title, REQUEST=None):
> >    "...."
> >    nQ=Query(id,title)
> >    dispatcher.Destination()._setObject(id, nQ)
>
> Apparently, "dispatcher" lacks a "Destination" method.
>
> Why are you using it?
> Usually "dispatcher._setObject" is enough.

I must confess that I copied it from an example (don't know which anymore).
Thanks anyway, problem solved, even when done in the __init__ of Queryset.
Would manage_afterAdd a more sensible place for it?

cb

_______________________________________________
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 )

Reply via email to