Message145539
| Author |
roger.serwy |
| Recipients |
roger.serwy |
| Date |
2011年10月14日.15:52:26 |
| SpamBayes Score |
2.1125688e-05 |
| Marked as misclassified |
No |
| Message-id |
<1318607548.28.0.391563618977.issue13179@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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) |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2011年10月14日 15:52:28 | roger.serwy | set | recipients:
+ roger.serwy |
| 2011年10月14日 15:52:28 | roger.serwy | set | messageid: <1318607548.28.0.391563618977.issue13179@psf.upfronthosting.co.za> |
| 2011年10月14日 15:52:27 | roger.serwy | link | issue13179 messages |
| 2011年10月14日 15:52:27 | roger.serwy | create |
|