In the app below none of the callbacks works, neither in the bind calls
nor the -command. I am using Tcl/Tk 9.0b2 on Linux. How can I make these callbacks work?
#!/usr/bin/env wish9
tk appname "Test App"
oo::class create App {
constructor {} {
wm withdraw .
wm title . [tk appname]
grid [ttk::button .quitButton -text Quit -underline 0 \
-command {my on_quit}]
bind <Escape> {my on_quit}
bind <Alt-q> {my on_quit}
}
method on_quit {} {
destroy .
}
method show {} {
wm deiconify .
raise .
}
}
set application [App new]
$application show
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 428 |
Nodes: | 16 (2 / 14) |
Uptime: | 109:11:33 |
Calls: | 9,053 |
Files: | 13,395 |
Messages: | 6,015,914 |