Yu-Jie Lin wrote on 2011-07-15 16:27:
> It results this error:
>
> File "/usr/lib64/python2.6/site-packages/urwid/widget.py", line 241, in pack
> raise NotImplementedError('Fixed widgets must override'
> NotImplementedError: Fixed widgets must override Widget.size()
>
> (And I believe this message is outdated, I think it meant "Widget.pack()"
> instead of "size()")
Yes, you're right.
> If uncomment the Filler line and comment the second Filler, it will result:
>
> File "/usr/lib64/python2.6/site-packages/urwid/decoration.py", line 547, in
> padding_values
> width, ignore = self._original_widget.pack(focus=focus)
> TypeError: pack() takes at least 2 non-keyword arguments (1 given)
Yes, those look like bugs. I guess so few people have been playing with
fixed widgets no-one noticed or complained until now.
> I am new to Urwid, still trying to learn how it works, but I believe that
> there
> is a missing definition of pack() in AttrMap, which is done by the commented
> the
> if clause above. If uncomment that part, the code runs as I expect. I think
> it's
> just a simple missing for pack() since other methods seem to be called
> correctly, <http://excess.org/urwid/browser/urwid/decoration.py#L207>. And if
> this is the case, then WidgetWrap may have the same issue,
> <http://excess.org/urwid/browser/urwid/widget.py#L1305>.
pack() was never quite finished as an addition to the standard widget
methods. Text has one that can be used to calculate ideal sizes for
wrapped text, and BigText has one for defining its fixed size, but
that's about it.
The plan was to use it for shrinking all sorts of flow and box widgets
and to return sizes for fixed widgets, but that got delayed after I
started to plan some big changes to the way containers work (and factor
out a whole bunch of common code). Those big changes haven't happened yet.
If you are willing to write those missing pack() methods that would be a
great help.
> PS. I wanted to create a bug report but the website's login/register functions
> looks gone (404 error). Also, I tried to search on Gmane, but the search
> function didn't seem to work, I apologizes if this issue has been answered.
I've had so much ticket spam that I redirected the login URL to
"/urwid/login-removethis" The trick is to remove the "-removethis" part
and then logging in should work.
Ian
_______________________________________________
Urwid mailing list
[email protected]
http://lists.excess.org/mailman/listinfo/urwid