Andrew Psaltis wrote:
> Ian,
> 
> Attached is a diff for main_loop.py that adds a GLibMainLoop class
> (taken with hg diff).  I know that it accomplishes simple functionality,
> but more complex things (like timeouts) have not been tested yet.  They
> should work, though.

Thanks Andrew!

It's a good starting point.

There is lots commented-out code that should be removed, and lots of duplicated
code between Generic and GLibMainLoop that should be pulled out into a parent
class, and I don't see why the globals in your patch are necessary.

I need to write some test code to validate current and future main loops.  It
might be tricky to write the tests, especially around the timing related code
but it will be hard to track down future problems without the tests.  I prefer
to test as much as possible before handing code to users.


> Also, I noticed some quirks:
> 
> When I attempt to subclass RadioButton, apparently, only the
> "RadioButton" part of the class gets stored in the "group" list. 
> Attempting to use the RadioButton functionality with the subclass itself
> in the group list works fine.  I'm not sure if my subclass should
> redefine the constructor to compensate for this, but what I have does
> work.  I noticed this with 0.9.8.4, but I have not tried otherwise with
> the trunk of the development repository.

I'm not sure what you mean, if you are making a proper subclass the whole thing
should be added to the list.


> Also, on the Linux terminal, at least with wicd-curses (which does
> indeed have quirks of its own), the prompt does not always end up in the
> correct position.  If I move and quit immediately, the prompt likes to
> place itself somewhere along the middle of the screen.  Most other
> times, it does display the prompt properly at the bottom of the screen
> as expected.  If it makes a difference, it uses an integrated version of
> the attached GLibMainLoop.

A little bit of code that reproduces the problem would be invaluable to
tracking down that sort of thing.

Ian


_______________________________________________
Urwid mailing list
[email protected]
http://lists.excess.org/mailman/listinfo/urwid

Reply via email to