ZDG bug (was: [Zope] Obj created in ExtMethod give "not allowed to use in this context")

Chris McDonough chrism@zope.com
Sun, 28 Jul 2002 17:52:58 -0400


I just fixed it.  At least in the Security chapter.

----- Original Message -----
From: "Dieter Maurer" <dieter@handshake.de>
To: "Joel Burton" <joel@joelburton.com>
Cc: "Zope@Zope. Org" <zope@zope.org>; <chrism@zope.com>
Sent: Sunday, July 28, 2002 5:42 PM
Subject: ZDG bug (was: [Zope] Obj created in ExtMethod give "not
allowed to use in this context")


> Joel Burton writes:
>  > I have an External Method that creates a Formulator BasicForm on
the fly and
>  > returns it to a calling PageTemplate:
>  >
>  > from Products.Formulator import Form
>  >
>  > def make_form(self, origform, addlist):
>  >     """Make form on the fly"""
>  >     nf = Form.BasicForm()
>  >     nf.add_fields( [ field
>  >                      for field in origform.get_fields()
>  >                      if field.getId() in addlist ] )
>  >     return nf
> It should return an acquisition wrapped object. Try:
>
>        return nf.__of__(self)
>
>
> This is wrong in the ZDG. Please fix it (through a comment for it).
>
>
> Dieter
>