Hello,
My name is Juan. I am new to the group and hope to exchange ideas and
suggestions.
Now I have a doubt. I started to code a program inside Visual TCL. I
all goes with bells and whistles, but as I am using the comm extension
to make a multiclient server program, I need to use the hook
"connected". The problem is that I put the following code inside the
<<Create>> event from the main window (the program has only one
window):
package require comm
::comm::comm config -listen 1 -local 0 -port 30001
::comm::comm hook connected {
set f [::comm::comm send $id open "id.txt"]
set nombre [::comm::comm send $id gets $f]
::comm::comm send $id close $f
tk_messageBox -message "$id-$nombre"
.top73.lis76 delete 0 end
.top73.lis76 insert 0 "$id-$nombre"
}
What am I doing wrong? Why is does not fire? It is Ok where I put the
hook (event Create) or it needs to go somewhere else?
Thanks.
Juan
My name is Juan. I am new to the group and hope to exchange ideas and
suggestions.
Now I have a doubt. I started to code a program inside Visual TCL. I
all goes with bells and whistles, but as I am using the comm extension
to make a multiclient server program, I need to use the hook
"connected". The problem is that I put the following code inside the
<<Create>> event from the main window (the program has only one
window):
package require comm
::comm::comm config -listen 1 -local 0 -port 30001
::comm::comm hook connected {
set f [::comm::comm send $id open "id.txt"]
set nombre [::comm::comm send $id gets $f]
::comm::comm send $id close $f
tk_messageBox -message "$id-$nombre"
.top73.lis76 delete 0 end
.top73.lis76 insert 0 "$id-$nombre"
}
What am I doing wrong? Why is does not fire? It is Ok where I put the
hook (event Create) or it needs to go somewhere else?
Thanks.
Juan