Added custom field type support to Form
[tcl-tlc.git] / scripts / servermodule.itcl
blob291deac720195c9506b857f2adf34464e1f606c3
1 # vim: foldmarker=<<<,>>>
3 class tlc::Servermodule {
4 constructor {serverobj tag} {}
5 destructor {}
7 protected {
8 variable currentconobj
11 private {
12 variable mytag
14 method handle_msg {conobj subcmd id msg}
19 body tlc::Servermodule::constructor {serverobj tag} { #<<<1
20 set mytag $tag
21 $serverobj register_handler $tag [code $this handle_msg]
25 body tlc::Servermodule::destructor {} { #<<<1
26 $serverobj deregister_handler $tag [code $this handle_msg]
30 body tlc::Servermodule::handle_msg {conobj subcmd id msg} { #<<<1
31 set currentconobj $conobj
32 set dat [eval $this [list $subcmd $msg]]
33 $conobj send 1 $id $dat