Message401634
Ah yes, you're right that `command=self._callback` doesn't pass the new value like it should.
Your suggestion does, but throws a "TypeError: 'NoneType' object is not callable" when no command is given when creating the OptionMenu. The current `_setit` implementation uses a `if self.__callback:` check for that.
Should we do something like this?
for val in values:
menu.add_radiobutton(label=val,
variable=self._variable)
if self._callback:
menu.entryconfigure('last', command=lambda val=val: self._callback(val))
I don't have any experience making pull requests. I might look into it at some point but for now it would be great if you could make it. |
|
Date |
User |
Action |
Args |
2021-09-11 08:47:08 | fhdrsdg | set | recipients:
+ fhdrsdg, serhiy.storchaka, epaine |
2021-09-11 08:47:08 | fhdrsdg | set | messageid: <1631350028.39.0.691692219323.issue45160@roundup.psfhosted.org> |
2021-09-11 08:47:08 | fhdrsdg | link | issue45160 messages |
2021-09-11 08:47:08 | fhdrsdg | create | |
|