Improved handling of case where child is killed by a signal
[tcl-tlc.git] / examples / mymenu.tcl
blob5fbe622189f9b917cbb89cff8bdc169a19af3e19
1 #!/usr/bin/env tclsh8.4
3 package require TLC
4 namespace import tlc::*
5 eval [go_home]
8 proc choose {which} {
9 puts "chose: ($which)"
13 Mymenu .m -schema {
14 "Option 1" {command {choose "o1"}}
15 "Option 2" {command {choose "o2"}}
16 "Option 3" {command {choose "o3"}}
17 "Other" {cascade {
18 "Option 4" {command {choose "o4"}}
19 "Option 5" {command {choose "o5"}}
20 "Still Others" {cascade {
21 "Option 6" {command {choose "o6"}}
22 "Option 7" {command {choose "o7"}}
28 bind . <Button-3> [list tk_popup .m %X %Y]