On Mon, Jun 19, 2006 at 07:59:07PM +0300, Marius Gedminas wrote:
> On Sun, Jun 18, 2006 at 01:33:48AM -0400, Christian Theune wrote:
> > I'm pretty confident that this change does what it is intended to do 
> > (fix 592 and some inconsistencies along the way).
> > 
> > But as I had to figure out some pretty old code and some of the 
> > architecture and dependencies in zope.app.form.browser, I might have 
> > made a mistake, although I supplied tests and changed the existing tests 
> > according to my view of the world.
> > 
> > Here's the changeset for the trunk:
> > http://svn.zope.org/Zope3/trunk/src/zope/app/form/browser/itemswidgets.py?rev=68729&view=rev
> It broke a functional test in one of the packages here.  The "(no
> value)" option disappeared from the dropdown.  It should not have
> disappeared, because the schema field explicitly says it is not
> required.  (The same thing happens with a real browser.)

The problem was that zope.mimetype had its own widget, that subclassed
(after a couple of levels of indirection) ItemsEditWidgetBase and
overrode renderItemsWithValues.  Your changeset shifted the
responsibility for rendering the (no value) choice from various
renderItems methods into renderItemsWithValues, and
zope.mimetype.widget.TranslatableSourceSelectWidget did not expect that.

I wonder how many widgets outside the Zope 3 source tree subclass
ItemsEditWidgetBase and override renderItemsWithValues...

Marius Gedminas
Stupidity management for the superuser is a user space issue in Unix
                -- Alan Cox

Attachment: signature.asc
Description: Digital signature

Zope3-dev mailing list
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to