[Urwid] crash on right aligned text

Ian Ward ian at excess.org
Tue Mar 14 22:31:36 EST 2006


toMpEr wrote:

>Hi,
>I dont know if its reported, but i found a bug in right aligned
>text widget.If i set the cursor to right aligned line in tour.py press end
>then home its gives an exception:
>  
>
...

>urwid.listbox.ListBoxError: Focus Widget <urwid.widget.AttrWrap instance at 0xb7b0ff4c> at position 32 within listbox calculated cursor coords (86, 0) but rendered cursor coords (87, 0)!
>  
>
No this hasn't been reported yet.  Thank you for finding this bug!

It is related to the new Layout class introduced in 0.9.0-pre1 and a 
slight difference in the way Edit widgets handle the cursor position.  
I'll try to have that fixed soon.

>btw.: is there any plan to menu widget and mouse support?
>  
>
A menu widget would be a nice addition.  It can be created with a Frame 
and Columns widget containing MenuItem widgets (see dialog.py example) 
for the menu bar ("File", "Edit" etc..).
The pop-up menu part can be created with an Overlay and a Pile 
containing MenuItems.

I'd be happy to accept patches if someone wants to try it.

Mouse support is the one thing that is stopping me from releasing a 1.0 
version of Urwid.  I want to find a really clean and flexible way to add 
mouse support. I am open to suggestions.

Ian




More information about the Urwid mailing list