[svlug] tcl/tk: was fortune cookies: do you have some favorites?
Steve Litt
slitt at troubleshooters.com
Fri May 15 11:50:27 PDT 2015
On Fri, 15 May 2015 00:43:59 -0700
Jesse Monroy <jesse650 at gmail.com> wrote:
> Lastly, the tcltk program that uses the fortune is now on github, for
> those interested.
> Warts and all.
>
> git clone https://github.com/jessemonroy650/totd
>
> Jesse
Very nice! I'll study this til I know the exact purpose of every line.
I already learned I was wrong about there being no functions in tcl.
A couple comments: In your README.md you comment that it requires wish
8.6, but you can change it to 8.5 or 8.4. The place I changed it to get
it to work was in the following totd.tcl line near the top:
exec wish8.5 "$0" "$@"
But the following line from cwindef.tcl had no effect:
set Wish /usr/local/bin/wish8.4
That's probably because my computer has no /usr/local/bin/wish*, but
instead has /usr/bin/wish and /usr/bin/wish8.4 and /usr/bin/wish8.5.
In README.md, you might want to document those two lines a bit more.
Also, I had no $TCLINC environment variable, so in order to run your
program I had to:
export TCLINC /d/at/tcl/totd-master
The other thing is, I made a copy of your totd shellscript, put it on
the path, and added the following:
cd /d/at/tcl/totd-master
So that it would start in the directory containing all the tcl files.
I have a question:
Why did you decide to make the field that displays the fortune
read-write instead of read-only?
Jesse, I really want to thank you for this. I've been trying for 15
years to understand tcl/tk, and have been held back by well written,
clean examples. Your code provides me with just what I need.
Thanks,
SteveT
Steve Litt
May 2015 featured book: Quit Joblessness: Start Your Own Business
http://www.troubleshooters.com/startbiz
More information about the svlug
mailing list