durusmail: quixote-users: Change in SelectWidget (was Re: [Quixote-users] Quixote 0.6: when?)
Quixote 0.6: when?
2002-11-05
2002-11-05
2002-11-05
2002-11-05
Change in SelectWidget (was Re: [Quixote-users] Quixote 0.6: when?)
2002-11-11
Re: Change in SelectWidget (was Re: [Quixote-users] Quixote 0.6: when?)
2002-11-11
Change in SelectWidget (was Re: [Quixote-users] Quixote 0.6: when?)
Greg Ward
2002-11-11
On 05 November 2002, Jonathan Corbet said:
> > We made yet another backwards incompatible change the other
> > day (although this one only affects SelectWidget and subclasses)
>
> Uh-oh...I use a lot of SelectWidgets.  What have you done to me now? :)

I didn't read the checkin message closely enough, that's what -- it
looks like backwards compatibility *was* preserved.  What you now code
as

  SingleSelectWidget(values=[val1, val2, val3],
                     descriptions=["Value 1", "Value 2", "Value 3"],
                     ...)

should still work, but the preferred way to spell that is now

  SingleSelectWidget(options=[(val1, "Value 1"),
                              (val2, "Value 2"),
                              (val3, "Value 3")],
                     ...)

which is nicer for *so* many reasons.  I'm a little bit mystified why we
did it with separate 'values' and 'descriptions' the first time around.
(And I think I wrote that bit!)  Oh well, live and learn.

        Greg

reply