classification
Title: Fixing several minor bugs in Tkinter.Canvas and one in Misc._configure
Type: behavior Stage: patch review
Components: Tkinter Versions: Python 3.2, Python 3.1, Python 2.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: BreamoreBoy, gpolo
Priority: normal Keywords: patch

Created on 2009-06-06 21:56 by gpolo, last changed 2010-08-04 20:08 by BreamoreBoy.

Files
File name Uploaded Description Edit
Canvas_fixes.diff gpolo, 2009-06-06 21:56 review
Messages (2)
msg89019 - (view) Author: Guilherme Polo (gpolo) * (Python committer) Date: 2009-06-06 21:56
Hi,

While testing Tkinter.Canvas I've found several minor bugs that I would
prefer to see fixed. Many of them change the current Canvas api a bit,
but for better. For example, the methods "focus", "gettags", "icursor",
"index", "insert", "move" (and some others) accept arbitrary amount of
arguments, but all these tcl subcommands have a fixed amount of
arguments they accept, so I consider it is better to make this clear on
Tkinter too.

I've also found a problem in Misc._configure which is also fixed by the
attached patch. The problem is that when cnf is a string, the call
"self.tk.split(self.tk.call(_flatten((self._w, cmd, '-'+cnf))))" may
still result in an empty string causing the following statement to fail
"return (x[0][1:],) + x[1:]".

One thing that left me curious was the comment "# XXX Should use
_flatten on args" in Canvas.coords. I've tried understanding why it
should use _flatten there, but couldn't figure it out. This is a very
old comment, so maybe it is no longer true ?
msg112880 - (view) Author: Mark Lawrence (BreamoreBoy) Date: 2010-08-04 20:08
msg89019 talks about changing the Canvas API, would this be acceptable?
History
Date User Action Args
2010-08-04 20:08:02BreamoreBoysetversions: + Python 3.2
nosy: + BreamoreBoy

messages: + msg112880

type: behavior
stage: patch review
2009-06-06 21:56:34gpolocreate