[Urwid] Bug found with selectable widget snapping while scrolling listbox.

Dominic LoBue dom.lobue at gmail.com
Wed Dec 2 00:06:11 EST 2009


On Tue, Dec 1, 2009 at 4:38 PM, Ian Ward <ian at excess.org> wrote:
> Dominic LoBue wrote:
>> Attached is a new hg export. I changed the behavior to what you
>> suggested. In addition I added the boolean attribute _snap to the
>> listbox. When _snap is set to True, the listbox scrolling behavior
>> snaps to to selectable widgets. When _snap is set to False, it
>> doesn't.
>>
>> Obviously not a perfect solution - the ideal would be to have the
>> scroller look for a "snap" attribute in the widget it is scrolling to,
>> and if that attribute is True, then snap. But I figured this was a
>> happy middle ground to get by until you separate scrolling from the
>> listbox like you wanted.
>>
>> Dominic
>
> This patch seems broken for me (expected indented block) and if I fix
> that then the unit tests fail.  Maybe the tests just need to be updated
> but that should be done carefully, along with adding a new test for the
> new behaviour.
>
> I'll look at it when I have some time.
>
> Ian
>
> _______________________________________________
> Urwid mailing list
> Urwid at lists.excess.org
> http://lists.excess.org/mailman/listinfo/urwid
>

I just noticed the error myself, sorry about that. I made the
modifications to the code in my project directory, and then copied it
over via diff/patch. I've fixed it on my end, but I have no idea how
to use mercurial to combine the patches or whatever. I'm used to git
myself...

I see the unit test failure you're talking about. I'll see if I can
figure it out when I get a chance.

Dominic



More information about the Urwid mailing list