Bugs item #1482402, was opened at 2006-05-05 11:15 Message generated for change (Comment added) made by mkiever You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1482402&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Tkinter Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Matthias Kievernagel (mkiever) Assigned to: Martin v. Löwis (loewis) Summary: Forwarding events and Tk.mainloop problem Initial Comment: (Python 2.4.1, tcl/tk 8.4 on Linux) I try to create a widget class (Frame2 in the example) containing a Listbox. This should report an event '<<ElementSelect>>' when the Listbox produces '<<ListboxSelect>>' or when the selection changes using the Up/Down keys. (see example script) Binding '<<ElementSelect>>' to the Frame2 widget produces the following traceback when the event is generated: ------------------ listbox select event generated Traceback (most recent call last): File "testevent.py", line 98, in ? tk.mainloop () File "/usr/local/lib/python2.4/lib-tk/Tkinter.py", line 965, in mainloop self.tk.mainloop(n) File "/usr/local/lib/python2.4/lib-tk/Tkinter.py", line 1349, in __call__ self.widget._report_exception() File "/usr/local/lib/python2.4/lib-tk/Tkinter.py", line 1112, in _report_exception root = self._root() AttributeError: Tk instance has no __call__ method ----------------- So Tkinter tries to report an exception caused by the event, but fails to do so by a second exception in _report_exception. (not quite sure I did understand this) The first exception may be a problem with my code or tcl/tk but at least the second is a problem of Tkinter. If you bind '<<ElementSelect>>' to Tk itself the example works fine. ---------------------------------------------------------------------- >Comment By: Matthias Kievernagel (mkiever) Date: 2007-01-19 15:43 Message: Logged In: YES user_id=1477880 Originator: YES I just found the time to re-investigate my reported bug and found out that it is due to a subclassing error of my own (redefine of Misc._root()). Sorry, for the false report. Can someone delete/reject or shoot it down? Greetings, Matthias Kievernagel ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1482402&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com