[Zope3-dev] Somebody review my fix for issue 592?
Marius Gedminas
mgedmin at b4net.lt
Mon Jun 19 13:16:58 EDT 2006
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
systems.
-- Alan Cox
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: Digital signature
Url : http://mail.zope.org/pipermail/zope3-dev/attachments/20060619/e9200a99/attachment.bin
More information about the Zope3-dev
mailing list