fhdrsdg <n00rb...@gmail.com> added the comment:
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. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue45160> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com