This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author weeble
Recipients Somelauw, ajaksu2, gpolo, weeble
Date 2009-01-26.11:29:29
SpamBayes Score 4.4997067e-10
Marked as misclassified No
Message-id <1232969371.85.0.0611589213215.issue4676@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2009-01-26 11:29:32weeblesetrecipients: + weeble, ajaksu2, gpolo, Somelauw
2009-01-26 11:29:31weeblesetmessageid: <1232969371.85.0.0611589213215.issue4676@psf.upfronthosting.co.za>
2009-01-26 11:29:31weeblelinkissue4676 messages
2009-01-26 11:29:29weeblecreate