[Zope3-Users] Dict Widget

mats.nordgren mats at ronin-group.org
Wed Jun 14 15:41:05 EDT 2006


Frank,

That would be great.  If you wish you can email it to me.

This should be included in the trunk IMHO.

Thanks,

Mats

On Wed, 14 Jun 2006 21:19:54 +0200, Frank Burkhardt wrote
> Hi,
> 
> On Wed, Jun 14, 2006 at 12:39:34PM -0500, mats.nordgren wrote:
> > I'm totally clueless as how to get a dict widget to work.
> > 
> > class IMyObject(Interface):
> >   mydict = Dict(
> >     title=u'My Dict',
> >     key_type=TextLine(),
> >     value_type=Int())
> > 
> > I see in zope.app.form.browser the config file has no view defined for IDict
> > and ?IField?.  Is it just a matter of configuring a view or do I also need to
> > make a custom widget.
> 
> AFAIK there's no Dict widget in zope.
> 
> > Any help appreciated,
> 
> You could wait until tomorrow when I'm back @work. I wrote 3 widgets:
>    * a generic dict widget (*:*)
>    * a choice dict widget (IChoice:*) which will remove elements already
>      used as keys from a given vocabulary.
>    * a language dict widget (ILanguageChoice:*) which is for 
> providing     an arbitrary number of language versions of something.
> 
> Additionally I wrote a a fixed Dict-class. The zope one 
> (zope.schema.Dict) is broken and doesn't bind the key_type correctly.
> 
> Regards,
> 
> Frank



More information about the Zope3-users mailing list