From: Donal K. F. <don...@ma...> - 2009-04-17 23:09:11
|
Zbigniew Baniewski wrote: > There are people - like myself - who prefer the option, because this will > make the field contents "strictly bound" to a widget. The problem is that the data model of such an option (given the general models of Tcl and Tk) is such that it's only convenient if reserved strictly for use by application code, and is left entirely alone by libraries. If we go to something more general capable of supporting use by both libraries and an application at the same time, you've got to make the syntax different. (Damon's suggestion would do that exactly.) Or you can use an array with a <Destroy> callback or command-delete trace for cleanup, and get your functionality today. In case you've got this idea that being an option is holy, realize that this is pretty much what Tk does internally when working out when to clean up structures. Wrapping that with fancy syntax is an exercise for the reader. Donal. |