<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Hi,</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">In trying to work through the PvW book, I get stuck in chapter 7, 2nd part, where the javascript/widgets are being introduced. After switching to SequenceWidget, I get to the same behavior/error as in below email but have not been able to find a reply on this email.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">I've tried both  Zope-3.2.2 and Zope-3.3.0 with Python 2.4.3 on Mac OS 10.4.8. I can't get  Zope3.x.x to build/work with Python-2.5.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">1) Zope catches an exception in zope.app.publish. Right now I am ignoring this.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>( <FONT class="Apple-style-span" size="4"><SPAN class="Apple-style-span" style="font-size: 13.6px;">Object: &lt;zope.app.folder.folder.Folder object at 0x2a381b0&gt;, name: u'favicon.ico' )</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" size="4"><SPAN class="Apple-style-span" style="font-size: 13.6px;"><BR class="khtml-block-placeholder"></SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">2) The errata for the PvW book does suggest a fix (for Zope-3.2 at least, defining def __init__), but that does not help.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Thanks a lot,</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Rob</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" color="#32688E" face="Courier" size="6"><SPAN class="Apple-style-span" style="font-size: 18.2px;"><B>Re: [Zope3-Users] worldcookery.browser.widget.DynamicSequenceWidget</B></SPAN></FONT></DIV><P style="margin: 0.0px 0.0px 13.0px 0.0px"><FONT class="Apple-style-span" color="#32688E" face="Courier" size="3"><SPAN class="Apple-style-span" style="font-size: 13px;"><I>Marco Mariani</I></SPAN></FONT><FONT class="Apple-style-span" color="#32688E" face="Courier" size="3"><SPAN class="Apple-style-span" style="font-size: 13px;"><BR></SPAN></FONT><FONT class="Apple-style-span" color="#888888" face="Courier" size="3"><SPAN class="Apple-style-span" style="font-size: 13px;">Tue, 21 Mar 2006 02:57:47 -0800</SPAN></FONT></P><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Courier" size="3"><SPAN class="Apple-style-span" style="font-size: 13px;">Ulrich P. Klein wrote:</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Courier" size="3"><SPAN class="Apple-style-span" style="font-size: 13px;">How should I modify the custom widget in the recipe examples to make it</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Courier" size="3"><SPAN class="Apple-style-span" style="font-size: 13px;">work with 3.2.0 ?</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Courier" size="3"><SPAN class="Apple-style-span" style="font-size: 13px;">As it is, the program does not work from chapter 7 onward</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 13px/normal Courier; min-height: 16px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Courier" size="3"><SPAN class="Apple-style-span" style="font-size: 13px;">I get this on zope.app.form.browser.SimpleInputWidget at every attempt to</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Courier" size="3"><SPAN class="Apple-style-span" style="font-size: 13px;">display the widget:</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 13px/normal Courier; min-height: 16px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Courier" size="3"><SPAN class="Apple-style-span" style="font-size: 13px;">    instance = self._widget_factory(*args)</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Courier" size="3"><SPAN class="Apple-style-span" style="font-size: 13px;">TypeError: __init__() takes exactly 4 arguments (3 given)</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 13px/normal Courier; min-height: 16px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 13px/normal Courier; min-height: 16px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Courier" size="3"><SPAN class="Apple-style-span" style="font-size: 13px;">--- browser/widget.py.orig 2004-07-10 17:59:36.000000000 +0200 +++ browser/widget.py 2006-03-19 18:28:16.000000000 +0100 @@ -1,9 +1,9 @@ from zope.app import zapi from zope.app.form.interfaces import IInputWidget -from zope.app.form.browser.widget import SimpleInputWidget +from zope.app.form.browser.sequencewidget import SequenceWidget from zope.app.pagetemplate.viewpagetemplatefile import ViewPageTemplateFile -class DynamicSequenceWidget(SimpleInputWidget): +class DynamicSequenceWidget(SequenceWidget): """Widget for (simple) sequences that does not require the form to be reloaded for every change."""</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 13px/normal Courier; min-height: 16px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Courier" size="3"><SPAN class="Apple-style-span" style="font-size: 13px;">Close, but it still doesn't work.</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Courier" size="3"><SPAN class="Apple-style-span" style="font-size: 13px;">The widget is displayed and works on the client, but I am unable to insert ingredients. Every time I click 'add' on the form, the ingredients list comes back empty and the recipe is refused (an error occured; there are 1 input errors).</SPAN></FONT></DIV></BODY></HTML>