Lino Website

code changes

worked on Job, Task and ProgressBar

Friday, 4. March 2005 13:48.

originally inspired by http://docs.python.org/mac/progressbar-objects.html

and http://search.cpan.org/src/FLUFFY/Term-ProgressBar-2.06-r1/README

and http://www.lpthe.jussieu.fr/~zeitlin/wxWindows/docs/wxwin_wxprogressdialog.html

idea: make ProgressBar a subclass of Job! If nested jobs are to be managed in a single ProgressBar, then that's the UI who decides. Currently there is no visualisation of a job nesting level.

If I want support for nested jobs, then a job will get a parent, instead.

Problem: PurzelStreamProgressBar must erase status line before writing any output, then write the output, then rewrite the status. That's why a ProgressBar is also a UI.

Maybe write \r only before next output? If there are other processes writing to the stream (e.g. print messages), these will overwrite the status bar only partially if they are short. In any case one should avoid writing directly to the stream if there is also a PurzelStreamProgressBar writing to it.

Console could split _stdout and _stderr into _debug, _verbose, _info, _warnings and _error. Depending on the console's verbosity, some of them would be noop writers. Advantage: performance?

Disadvantage: how to capture? The current startDump()/stopDump() which is very usful for tesst cases wouldn't be possible anymore.

There is a difference between filtering messages according to their importance level, and deciding where they go.

Copyright 2001-2007 Luc Saffre.
http://lino.saffre-rumma.ee
Generated 2007-06-07 16:22:22