Ned Deily <n...@acm.org> added the comment:

This seems to me to be a nasty release blocker. As documented in the Tk bug 
that Victor cited (thanks!), the crash occurs in Cocoa Tk when an input method 
prefix "dead key" combining character is typed in a Tk text field. So, for 
example, with the US Extended input method on a US keyboard, to type ñ, you can 
type the two keystrokes: Option-n n.  Or for an ä: Option-u a. Typing the 
leading dead key causes Tk to crash with the "index out of bounds" exception, 
bringing down tkinter and IDLE with it (and users losing their edits).  There 
is a workaround for users to enter these characters without a crash.  OS X also 
supports a postfix "dead key" combining sequence; ñ -> n Shift-Option-n and ä 
-> a Shift-Option-u.  The postfix forms do not cause a crash with Cocoa Tk 8.5 
and the expected character is stored in the field, although the screen may not 
get properly updated.  But, I suspect of the two, the prefix method is much 
more commonly used and, in any case, it is not reasonable to warn users that 
they risk a crash if they enter a common keyboard sequence.  (The other common 
method to enter characters not available on the keyboard is to use the system 
Character Viewer which gives access to all Unicode code points.  Unfortunately, 
Character Viewer input doesn't seem to work with Cocoa Tk 8.5.  That would seem 
to be a major deficiency in Cocoa Tk's support for full Unicode input.)

This problem is exhibited in the Apple-supplied Cocoa Tk 8.5 shipped with OS X 
10.6 and the Apple-supplied IDLEs (/usr/bin/idle2.6 and /usr/bin/idle2.5) 
suffer from the same vulnerability.  So this is not a new problem in the 
ActiveState Tk 8.5.9.  The Tk bug report on the SourceForge tracker was opened 
and accepted nearly a year ago and, although subsequent comments and activity 
have raised the priority to 9 (critical), there is no indication that a fix is 
forthcoming soon.  I am pinging both at the SF tracker and on the Tcl Mac list 
and will propose some alternatives for 3.2 here shortly.

----------
components: +Tkinter
nosy: +benjamin.peterson, georg.brandl
priority: normal -> release blocker
title: 'ñ' not working with IDLE 3.2rc1 - OSX 10.6.6 -> OS X 10.6 IDLE, 
tkinter: Cocoa Tk 8.5 crash when composite character typed in text field
versions: +Python 2.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue10973>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to