On Thursday, July 2, 2015 at 6:42:22 PM UTC-5, MRAB wrote: > On 2015-07-02 23:33, Ben Elam wrote: > > I've stripped things down to the least amount of code necessary to > > reproduce the error. I can make tk.Button handle event '<3>' but not event > > '<1>'. That is, the function the event is passed to receives the event and > > can even print the address of the event object, but a callback later > > produces an error suggesting that no event was actually passed to the > > function. Also, tk.Label handles '<1>' without problem. What gives? > > > > Code, errors, and slightly more details here: > > > > http://ingcake.github.io/2015/07/02/tkinter-feature-request---clickable-button/ > > > > I hope I'm just doing something dumb; any help would be much appreciated. > > > For a start, you're binding buttonHandler1 to button1 twice: > > 1. Passed via the 'command' keyword on line 13. > > 2 Via 'bind' on line 14. > > In 1, no argument will be passed. The handler you've defined expects an > argument, so there'll be an exception, although the program will > continue afterwards. > > In 2, an event argument will be passed.
That was indeed the issue! "I'm dumb" it is! Thanks. -- https://mail.python.org/mailman/listinfo/python-list