Tkinter bug in Misc.tkraise, Canvas.tkraise
Michael P. Reilly
arcege at shore.net
Thu Apr 8 11:15:36 EDT 1999
Guido van Rossum <guido at CNRI.Reston.VA.US> wrote:
:> 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.
Actually, I got the name "tag_raise" from the method in the Text class
of the same name.
: 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.
Good enough for me.
: Other issues:
: - As someone else suggested, the proper solution is
: Misc.tkraise(canvasobject).
The proper interim solution only, I think.
: - /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. :-)
Well.. I knew he was in there somewhere. ;) Sorry, Fredrik!
: - 1.5.2 will more likely be released around mid-April.
I'm awaitin'. :)
: --Guido van Rossum (home page: http://www.python.org/~guido/)
Thanks, Guido!
-Arcege
More information about the Python-list
mailing list