Hi Peter,
Thanks for getting back to LTK.
Hmm, Windows is strange :). But your explanation is the best I have
heard for the windows problems so far... so I added
#+mswindows (sleep 1)
The waiting for a prompt has only one problem - tcl doesn't send a prompt when run as a subprocess.
I've poked at this a bit more; the sleep doesn't fix all my problems. It appears that incomplete commands are being flushed to wish and/or ltk is overflowing a stream buffer somewhere. For example, running ltktest with a trace on read-wish, I see errors like
LTK::READ-WISH returned (:ERROR "value for "-textvaria" missing") or Error sending command to wish: on #<BASIC-CHARACTER-OUTPUT-STREAM ISO-8859-1 (PIPE/1092) #x8D5F2BE> : Invalid argument during write or LTK::READ-WISH returned (:ERROR "missing close-brace")
This appears to be a race condition; the error changes randomly with each run (though the above are the most common). Sometimes the test almost works, other times it stops early. I did have to comment out the section which draws the lines -- that almost never worked. Similarly, theme-names generally fails (or whatever else does the first read-wish). For some reason, the situation can be aggravated by adding flush-wish in various places.
But the first sleep at least lets Tk's window appear.
- Daniel
P.S. I'm debugging this in an attempt to get ABLE running.