[ltk-user] LTK isn't extensible

Chris Capel pdf23ds at gmail.com
Tue Dec 14 01:56:30 UTC 2004


I've run up against LTK's incompleteness a couple times now. First, I
wanted to be able to change the default color of shapes drawn on a
canvas. My quick fix was to create an optional parameter to
create-oval that passes its argument on at the end of the command to
wish. Not exactly an ideal fix. The second time was when I wanted to
change the back color of my canvas to black, which I will probably
work around by changing the default color of the canvas created by the
canvas class to black. Again, not a clean fix.

Now, it would be possible to complete LTK by adding all the possible
parameters to every command as arguments or slots, depending on how
that command is abstracted. I assume that, with enough interest, this
is the eventual goal. It would also be possible to have everything
accept optional parameters to let users stick parameters onto the ends
of things (but they still have to know the parameters exist, and to
know tcl syntax, and probably sometimes to look at the source to
figure out which command is being issued for a given ltk function).
For the time being, the latter option seems to be the best choice.
Would Peter like me to look into adding this to LTK? Perhaps he'd
rather take on the project?

Chris Capel
-- 
"What is it like to be a bat? What is it like to bat a bee? What is it
like to be a bee being batted? What is it like to be a batted bee?"
-- The Mind's I (Hofstadter, Dennet)



More information about the ltk-user mailing list