Are my posts making it to the list?
I am new to TCL and TK so my problem is probably DUMB, however,
I am having some strange TCL problems when using VTCL. Platform
is Linux 2.0.29, TCL 8.0, TK 8.0. Caldera Standard with
LIBC 5.4.36.
I have a main window with a text area and several buttons.
I have several procedures defined (and sort of functional).
My main function calls a proc "Update" which updates the
text display. In this proc I had code like:
if [catch {open $netstats r} fdes] {
puts "Invalid file $netstats"
} else {
$widget(txt1) delete 6.0 end
$widget(txt1) insert 6.1 "Network Statistics:\n"
while {[gets $fdes line] >= 0}{
$widget(txt1) insert insert "$line\n"
}
close $fdes
}
I get an error on the while, "malformed expression word".
I changed the code to use:
foreach line [split [read $fdes] \n] {
set mm [string first cdrom $line]
puts "cdrom=$mm"
if {$mm < 0}{
set mounts(cdrom) 1
With the string both in the "if" and as abov). Both times
I get the same "malformed expression word" error from wish.
Any ideas? This appears to be a floating problem.... It appears
in one place, I code around it, then it moves somewhere else....
Thanks,
--
Wade Hampton [EMAIL PROTECTED]
Use Linux -- Check out http://www.caldera.com