[LWN Logo]

To: "Michael P. Reilly" <arcege@shore.net>
Subject: Re: Tkinter bug in Misc.tkraise, Canvas.tkraise
Date: Tue, 06 Apr 1999 16:43:29 -0400
From: Guido van Rossum <guido@CNRI.Reston.VA.US>

> It is not a bug with either code, it is a naming problem.  The
> Canvas.tkraise is calling the correct code, but it should be called
> tag_raise, not tkraise (see the Text widget for naming choice).
> 
> Fredrik or Guido, is this something you can change for before 1.5.2 is
> released?  (I don't see anything on www.python.org/1.5/ that says when
> 1.5.2 will be done except "mid March", which has gone by.)

You are right that there is a naming conflict.  Unfortunately the
default rules for naming Tk subcommands yield this conflict and I
didn't catch it when I (or whoever it was) originally created the
Canvas class.  The Canvas.bind() method shows a precedent for naming
it tag_raise() as you propose.

Unfortunately, I cannot make this change without breaking all existing 
code that was using Canvas.tkraise() for raising Canvas items (instead 
of raising the Canvas itself).  I can add tag_raise() and then in 1.6
we can delete the tkraise() and lift() names.

Other issues:

- As someone else suggested, the proper solution is
Misc.tkraise(canvasobject).

- /Fredrik Lundh is responsible for *documenting* Tkinter, but not for
its maintenance (although he contributed a bunch of support modules).
The maintenance of Tkinter is strictly my responsibility.  (Not that I
asked for it. :-)

- 1.5.2 will more likely be released around mid-April.

--Guido van Rossum (home page: http://www.python.org/~guido/)