I have written some code with vtcl that runs fine when I run it from with wish
but fails in "test" mode within vtcl.
The code opens a network socket to a C application which reads input and
replies with either "OK" or "FAIL".
The tcl code looks like this
-------------------------------------------------------------
proc {updateF1} {} {
global widget but19 but20 but21 but22 but23 but25 comms
set F1 [expr $but19 + $but20 + $but21 + $but22 + $but23 + $but25]
puts "F1 = $F1"
puts -nonewline $comms "WG F1 $F1 "
flush $comms
set n [gets $comms reply]
puts "reply=$reply n=$n"
}
---------------------------------------------------------------
The C code uses "write(fd,"OK\n",4);" to send the reply.
The first time this is called I get the expected output
"reply=OK n=3"
Following calls produce just
"reply="
If I run the code from wish I get the correct output every time.
Any ideas ?
Peter Onion
----------------------------------
E-Mail: Peter Onion <[EMAIL PROTECTED]>
Date: 09-Oct-00
Time: 10:38:21
This message was sent by XFMail
----------------------------------
_______________________________________________
vtcl-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/mailman/listinfo/vtcl-user