[issue8204] test_ttk_guionly assertion error on 3.x linux 64-bit
Martin v. Löwis mar...@v.loewis.de added the comment: I can reproduce the problem. The root cause is that the event generate .nb Control-Tab simply does not have any effect - neither through Python, nor through directly wish. Nor do any of the other keys that supposedly cycle through the notebook, when send through event generate. Typing them directly works fine. Guilherme, any idea? -- assignee: - gpolo nosy: +gpolo, loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8204 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8204] test_ttk_guionly assertion error on 3.x linux 64-bit
Guilherme Polo ggp...@gmail.com added the comment: Martin v. Löwis added the comment: I can reproduce the problem. The root cause is that the event generate .nb Control-Tab simply does not have any effect - neither through Python, nor through directly wish. Nor do any of the other keys that supposedly cycle through the notebook, when send through event generate. Typing them directly works fine. Could it be caused because the notebook is not focused at the correct time ? Here in OSX (finally I have one of these) I had to add self.nb.focus() before that event_generate. The attached patch is for trunk. -- keywords: +patch Added file: http://bugs.python.org/file16818/p1.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8204 ___Index: Lib/lib-tk/test/test_ttk/test_widgets.py === --- Lib/lib-tk/test/test_ttk/test_widgets.py(revision 79905) +++ Lib/lib-tk/test/test_ttk/test_widgets.py(working copy) @@ -704,6 +704,7 @@ self.nb.select(0) support.simulate_mouse_click(self.nb, 5, 5) +self.nb.focus() self.nb.event_generate('Control-Tab') self.assertEqual(self.nb.select(), str(self.child2)) self.nb.event_generate('Shift-Control-Tab') ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8204] test_ttk_guionly assertion error on 3.x linux 64-bit
Martin v. Löwis mar...@v.loewis.de added the comment: Could it be caused because the notebook is not focused at the correct time ? Here in OSX (finally I have one of these) I had to add self.nb.focus() before that event_generate. No, that doesn't help. The event still gets lost. In particular, running ttk::notebook .nb .nb add [label .nb.l1 -text hello] -text a .nb add [label .nb.l2 -text world] -text b pack .nb focus .nb puts [.nb select] event generate .nb Key-Right puts [.nb select] in wish prints .nb.l1 twice; pressing the right key at the end of the script does cycle properly, though. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8204 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8204] test_ttk_guionly assertion error on 3.x linux 64-bit
Guilherme Polo ggp...@gmail.com added the comment: When I run that alone I get the same effect, maybe there is something else contributing to the previous result I saw. focus_force did solve when testing it alone, and I think it is ok to use focus_force when testing at least. Here is the sample I tried: import ttk import Tkinter as tk nb = ttk.Notebook() nb.add(tk.Label(text='hi'), text='a') nb.add(tk.Label(text='there'), text='b') nb.pack() nb.wait_visibility() nb.focus_force() print nb.select() nb.event_generate('Key-Right') print nb.select() -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8204 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8204] test_ttk_guionly assertion error on 3.x linux 64-bit
Changes by Guilherme Polo ggp...@gmail.com: Removed file: http://bugs.python.org/file16818/p1.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8204 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8204] test_ttk_guionly assertion error on 3.x linux 64-bit
Martin v. Löwis mar...@v.loewis.de added the comment: Thanks for the advice. I managed to fix this (for me) in r79907; I had to force focus before every single event :-( -- keywords: +buildbot resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8204 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8204] test_ttk_guionly assertion error on 3.x linux 64-bit
New submission from Sridhar Ratnakumar sridh...@activestate.com: This happens on 3.1.2 Linux 64-bit. test test_ttk_guionly failed -- Traceback (most recent call last): File /home/apy/rrun/tmp/autotest/apy/lib/python3.1/tkinter/test/test_ttk/test_widgets.py, line 708, in test_traversal self.assertEqual(self.nb.select(), str(self.child2)) AssertionError: '.183072530064' != '.183072529552' -- components: Tests, Tkinter messages: 101533 nosy: srid severity: normal status: open title: test_ttk_guionly assertion error on 3.x linux 64-bit type: behavior versions: Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8204 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com