Thanks Pete,
 I registered the adapters in the shell and it works.
 The trouble is that I have the same problem from zope. 
 It seems that the adapters for the shema fields are not registered, 
 therefore I can't have formlib working, even when I register the adapters 
 by code. I don't know what  to do. The fact is I use AJAX, 
 so I don't have to register my pages, since they are never called, but
 used to generate the html I use to update my pages (which works fine 
 Maybe this explains the behaviour I get, but I doubt it.

----- Message d'origine ----
De : Pete Taylor <[EMAIL PROTECTED]>
Envoyé le : Mardi, 18 Avril 2006, 2h13mn 10s
Objet : Re: FW: [Zope3-Users] formlib problem

formlib works just fine, but from the shell i haven't had much luck
either.  probably need to look at the test suite that runs with
form.txt and do the necessary setup for it to work correctly.  i found
it easier just to build a few sample forms and zcml, and learn "by
doing" since getting the shell to work right was kinda a pain ;)

> -----Original Message-----
> Behalf Of Stéphane Brault
> Sent: Tuesday, April 18, 2006 7:42 AM
> To: user-list zope
> Subject: [Zope3-Users] formlib problem
> Hi,
>  I can't use formlib, when I run the example in the form.txt I get this
> error:
>  Traceback (most recent call last):
>    File "<pyshell#29>", line 1, in -toplevel-
>      print MyForm(None, request)()
>    File "<pyshell#26>", line 6, in __call__
>      widgets = form.setUpWidgets(self.form_fields, 'form', self.context,
> self.request, ignore_request= ignore_request)
>    File "C:\Python24\Lib\site-packages\zope\formlib\", line 255, in
> setUpWidgets
>      IInputWidget)
>    File "C:\Python24\Lib\site-packages\zope\component\", line
> 154, in getMultiAdapter
>      raise ComponentLookupError(objects, interface, name)
>  ComponentLookupError: ((,>), , u'')
>  It happens when setUpWidgets is called in the first example, do I need to
> import something or to configure a component for formlib to work ?
>  Any hint ?
>  Thanks,
>  Stéphane
> _______________________________________________
> Zope3-users mailing list

"All guilt is relative, loyalty counts, and never let your conscience
be your guide."
  - Lucas Buck, American Gothic

Zope3-users mailing list

Reply via email to