zopefoundation / z3c.form

An advanced form and widget framework for Zope 3
Other
8 stars 39 forks source link

items as property or method #44

Closed mauritsvanrees closed 7 years ago

mauritsvanrees commented 8 years ago

When I update the z3c.form version in Plone 5.1 (development) from 3.2.9 to 3.2.10, I get errors like this:

.../Products/CMFPlone/controlpanel/browser/syndication.py", line 43, in forceCheckboxValue
    for item in widget.items:
TypeError: 'instancemethod' object is not iterable

and this:

.../plone/app/contenttypes/migration/browser.py", line 402, in updateWidgets
    if not len(widget.items):
TypeError: object of type 'instancemethod' has no len()

This is caused by dd40f6f513b08854c64e8d59cf6440082f4b11d9.

Before this change, the select browser view was the only one with items as method. After this change, the orderedselect browser view is the only one with items as property.

It would be nicer if all were the same, but it's not clear which one it should be... Can we compromise and update the changed radio and checkbox browser view to use their new methods but add an @property?