New submission from Roger Serwy <roger.se...@gmail.com>: IDLE's EditorWindow.py relies on using FileList.py's "vars" dictionary to store Tkinter variables instead of using its own. As a consequence, toggling a checked menu item in one editor window toggles the menu item in ALL editor windows.
To reproduce this error, open two editor windows with Code Context initially disabled. Enable Code Context in one window and then click "Options" in the other. You'll see Code Context checked when it shouldn't be. Attached is a patch to fix this problem. It causes EditorWindow to have its own dictionary for handling these Tkinter variables instead of using the flist's "vars". The comment in FileList.py suggests that this design is a relic from an old version of IDLE, since getrawvar is no longer a function. self.vars = {} # For EditorWindow.getrawvar (shared Tcl variables) ---------- components: IDLE files: patch_EditorWindow.diff keywords: patch messages: 145539 nosy: serwy priority: normal severity: normal status: open title: IDLE uses common tkinter variables across all editor windows type: behavior versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2 Added file: http://bugs.python.org/file23406/patch_EditorWindow.diff _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue13179> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com