[z3-five] Widget for editing Tuple the same way lines works in Zope 2

Morten W. Petersen morten at nidelven-it.no
Sat Nov 18 12:38:49 CET 2006


Yuppie,
>
> AFAICT Zope doesn't ship with a widget like that and I'm not aware of 
> any third party package that does.
>
> But I needed one myself and wrote the attached code. Please let me 
> know if you find any issues, it's not well tested. The widget might 
> become part of CMF 2.1.

Thanks for that code.  I implemented the widget as a
product (had to do some imports) and the product
loads successfully.

However, when I make use of the widget

        <widget
            field="all_subscribers"
            class="Products.TupleTextWidget.TupleTextAreaWidget"
        />

the following message appears on the edit page

Error Type

    TypeError
Error Value
    __init__() takes exactly 3 arguments (4 given)


with the following traceback:

[...]

    * Module zope.app.form.utility, line 224, in setUpEditWidgets
    * Module zope.app.form.utility, line 101, in setUpWidget
    * Module zope.app.form, line 120, in __call__
    * Module zope.app.form, line 102, in _create

Do you know what needs to be changed here for this to work?

Thanks,

Morten



More information about the z3-five mailing list