Re: new Tkinter

Rich Neitzel (thor@ymir.atd.ucar.edu)
20 Jun 1994 17:55:11 GMT

In article <9406200925.AA22774=guido@voorn.cwi.nl>, Guido.van.Rossum@cwi.nl
writes:
|> 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!
|>
I'm all for this. It would be nice to be able to walk the list of children
for a particular parent or know which one has the selection.
-- 
Richard Neitzel thor@thor.atd.ucar.edu          Torren med sitt skjegg
National Center For Atmospheric Research        lokkar borni under sole-vegg
Box 3000 Boulder, CO 80307-3000	                Gjx'i med sitt shinn
303-497-2057                                    jagar borni inn.