Re: new Tkinter

Guido.van.Rossum@cwi.nl
Mon, 20 Jun 1994 11:25:16 +0200

I have a question about a new development in Tkinter.

Currently, Tk calls that return widget identifiers are not supported
(e.g. winfo children). I believe that these should return Python
Widget objects. The only way I can see implementing this is to
maintain a dictionary (e.g. in the root object) mapping widget names
to Widget objects. A problem with that is that it would mean that
widgets will no longer auto-destruct themselves when their reference
count goes to zero -- because of the circular links between parents
and children only an explicit w.destroy() call will delete a widget.

This may or may not be a problem. It means that Python code that
dynamically generates lots of temporary widgets will have to be a
little bit more careful to destroy them. But then, the same is true
for Tcl code (in Tcl widgets are never automatically destroyed except
when the program exits).

Your opinions please!

--Guido van Rossum, CWI, Amsterdam <Guido.van.Rossum@cwi.nl>
URL: <http://www.cwi.nl/cwi/people/Guido.van.Rossum.html>