[Zope] building product from the doc

Dieter Maurer dieter@handshake.de
Fri, 4 Jul 2003 20:48:31 +0200


Aur=E9lien Camp=E9as wrote at 2003-7-1 17:33 +0200:
 > I'm currently trying to build a small & simple product, following
 > (closely) advice from
 > http://www.zope.org/Documentation/Books/ZDG/current/Products.stx
 >=20
 > The doc is clear and well done, but now I'm stuck on this : when I try
 > to add some 'Candidat' (the meta_type of the product), I get from the
 > ZMI a=20
 >=20
 > Zope Error
 >=20
 >=20
 > Zope has encountered an error while publishing this resource.
 >=20
 >=20
 > Error Type: TypeError
 >  Error Value: addForm() takes no arguments (1 given)

Your "addForm" definition does not define an argument but the
context calls it with one.

If "addForm" is a method, then almost surely "self" is missing.
Unlike in other OO languages (as C++ and Java)
Python methods must have an explicit (first) "self" argument representing
the object instance the method is called for.


Dieter