msg56306 - (view) |
Author: Tal Einat (taleinat) *  |
Date: 2007-10-10 02:17 |
The Percolator class has been very hard to figure out, and has been a source of confusion for users wanting to "hack" IDLE. This patch makes Percolator a generally useful class which inherits from Delegator. It also adds a new class, TkTextPercolator, which inherits from Percolator and does all of the Text widget specific stuff. The code has been refactored, cleaned up, and the in-code comments have been improved. UndoDelegator.py, ColorDelegator.py and EditorWindow.py have been updated as needed. Also, the code using ColorDelegator in EditorWindow.py has been slightly modified to work better with the Percolator. I've done some testing (only on WinXP but nothing here is platform specific) and this seems to work without a hitch. This patch is required for the Squeezer and ShellLogger IDLE extensions found on PyPI to be able to co-exist. |
|
|
msg56308 - (view) |
Author: Guido van Rossum (gvanrossum) *  |
Date: 2007-10-10 03:21 |
It's been too long since I wrote this code to be able to review, but I'm glad that it still gets some love and attention. Here's to hoping that your patch gets applied. |
|
|
msg56448 - (view) |
Author: Kurt B. Kaiser (kbk) *  |
Date: 2007-10-15 16:25 |
Thanks for the patch, it will definitely be applied once I finish reviewing it! Good job splitting off TkTextPercolator and inheriting from Delegator. |
|
|
msg56653 - (view) |
Author: Kurt B. Kaiser (kbk) *  |
Date: 2007-10-22 18:08 |
What change was required to allow Squeezer and ShellLogger to co-exist? |
|
|
msg56680 - (view) |
Author: Tal Einat (taleinat) *  |
Date: 2007-10-23 13:49 |
The change required for Squeezer and ShellLogger is the separation of the Tk Text specific logic into a subclass, which makes Percolator a generally useful class. Along with the simple patch to Delegator.py which allows delegation to callables, this change allows one to replace a method with a Percolator instance. I want to do this for EditorWindow.write, since both Squeezer and ShellLogger need to hook onto this call somehow. Furthermore, ShellLogger must catch this call before Squeezer does, since Squeezer may change the output, but the original output should pass through ShellLogger first. Since there is no way to control the order in which extensions are loaded, this constraint must be enforced by the extensions themselves. Using the patched Percolator is the simplest way I could come up with to support this. (IMHO adding a constraint solver for extensions at this point would be overkill.) |
|
|
msg111026 - (view) |
Author: Tal Einat (taleinat) *  |
Date: 2010-07-21 09:26 |
Note that at one point discussion of this issue was continued on the tracker page for . |
|
|
msg210212 - (view) |
Author: Tal Einat (taleinat) *  |
Date: 2014-02-04 12:02 |
This should be closed as "wont fix". |
|
|
msg220199 - (view) |
Author: Mark Lawrence (BreamoreBoy) * |
Date: 2014-06-10 21:48 |
Can somebody please close as requested in , thanks. |
|
|
msg220215 - (view) |
Author: Terry J. Reedy (terry.reedy) *  |
Date: 2014-06-10 23:47 |
Tal could have. Anyway, I made a note to look at this or #1252 if I want to understand Percolator or Delegator or think about changing them. |
|
|