Message80568
Just got a chance to test this on a Windows desktop with a proper
keyboard. (My laptop does weird things with num-lock and scroll-lock.) I
got it to crash once, but I have no idea what was special about that
time. Otherwise I can reproduce the exception traceback printed to the
console, with the following steps:
1) Start IDLE from the console, e.g.:
python c:\python26\Lib\idlelib\idle.py
2) Make sure num-lock is turned OFF.
3) Enter a few characters, e.g:
rhubarb
4) Press shift+left to create a selection of at least one character.
5) Press shift+home. The stack trace appears in the console:
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Python26\lib\lib-tk\Tkinter.py", line 1410, in __call__
return self.func(*args)
File "C:\Python26\lib\idlelib\MultiCall.py", line 150, in handler
r = l[i](event)
File "C:\Python26\lib\idlelib\EditorWindow.py", line 333, in
home_callback
if self.text.compare(first,">",last):
File "C:\Python26\lib\lib-tk\Tkinter.py", line 2858, in compare
self._w, 'compare', index1, op, index2))
TclError: expected boolean value but got ""
This is consistent with my understanding that Tk 8.5 does not use a mark
named "anchor" to indicate the selection anchor. I have written a patch
that directly calls "tk::TextKeySelect" instead of trying to duplicate
its behaviour using the "anchor" mark. I'm not terribly confident with
using diff and patch, so please let me know if I've done it wrong. I did
use -u. |
|
Date |
User |
Action |
Args |
2009-01-26 11:29:32 | weeble | set | recipients:
+ weeble, ajaksu2, gpolo, Somelauw |
2009-01-26 11:29:31 | weeble | set | messageid: <1232969371.85.0.0611589213215.issue4676@psf.upfronthosting.co.za> |
2009-01-26 11:29:31 | weeble | link | issue4676 messages |
2009-01-26 11:29:29 | weeble | create | |
|