summaryrefslogtreecommitdiff
path: root/examples/unBind.tcl
blob: 4378213f70f71b593a1134f50aef87d51949f2f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/tclsh
load ../src/libtclivy.so.3.6

proc connect { client action } { }

proc send { } {
  global tosend
  Ivy::send $tosend
}

proc dotext {client} {
  global id
  puts "$client told me to unbind (to $id)"
  Ivy::unbind $id
}

Ivy::init "TCLTK" "TCLTK Ready" connect connect
Ivy::start ""
set id [Ivy::bind "^unbind" dotext]
puts "bound to value $id"

vwait tcl_interactive