Discussion:
[urwid] executing a callback when a widget gets focus
Robert Urban
2017-09-09 01:46:11 UTC
Permalink
Hello,

in the past I have successfully been using the following construct to have a
self._parent = parent
return self.__super.__init__(walker)
return self.__super._get_focus_position()
self.__super._set_focus_position(item)
self._parent.update_footer()
focus_position = property(_get_focus_position, _set_focus_position,'')
However this stopped working recently, I guess because the internal
implementation changed. I'm using v1.3.0.

How can I get this to work again?

Rob Urban

P.S., the entire test program can be found here:
https://bpaste.net/show/6d03bfd2d464
--
You received this message because you are subscribed to the Google Groups "Urwid Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to urwid+***@excess.org.
To post to this group, send email to ***@excess.org.
For more options, visit https://groups.google.com/a/excess.org/d/optout.
Robert Urban
2017-09-09 09:29:45 UTC
Permalink
Hello again,

it seems using

urwid.connect_signal(list_walker, "modified", callback)

is the solution.

Rob Urban
Post by Robert Urban
Hello,
in the past I have successfully been using the following construct to have a
self._parent = parent
return self.__super.__init__(walker)
return self.__super._get_focus_position()
self.__super._set_focus_position(item)
self._parent.update_footer()
focus_position = property(_get_focus_position, _set_focus_position,'')
However this stopped working recently, I guess because the internal
implementation changed. I'm using v1.3.0.
How can I get this to work again?
Rob Urban
https://bpaste.net/show/6d03bfd2d464
--
You received this message because you are subscribed to the Google Groups "Urwid Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to urwid+***@excess.org.
To post to this group, send email to ***@excess.org.
For more options, visit https://groups.google.com/a/excess.org/d/optout.
Loading...