Instantiating widgets by calling a factory method in its container-to-be is weird. Having widgets pack themselves is odd. Passing references and having the widgets update when the variable changes is strange. I get a distinct feeling of "ick" when working with Tk or reading Tk code.
In Gtk2, you instantiate a widget by calling its class's constructor, pass it to its container to pack it, and use its accessor methods to change its state. This is how I expect responsibilities to be distributed in any sane class library.
Makeshifts last the longest.
|