Re: [Zope3-dev] Somebody review my fix for issue 592?
Hi, 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=68729view=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.) Reverting the change made in rev 68729 to src/zope/app/form/browser/itemswidgets.py makes the (no value) choice reappear and therefore fixes the problem. I'm still trying to understand why it happens in that view, but not in some other views that also have not-required Choice fields. Marius Gedminas -- If you are smart enough to know that you're not smart enough to be an Engineer, then you're in Business. signature.asc Description: Digital signature ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] Somebody review my fix for issue 592?
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=68729view=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 signature.asc Description: Digital signature ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
[Zope3-dev] Somebody review my fix for issue 592?
Hi, 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=68729view=rev The changeset for Zope 3.3 is identical. Christian -- gocept gmbh co. kg - forsterstraße 29 - 06112 halle/saale - germany www.gocept.com - [EMAIL PROTECTED] - phone +49 345 122 9889 7 - fax +49 345 122 9889 1 - zope and plone consulting and development ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com