Reputation: 1
I just built tcl 8.5 from the sources provided and I'm starting a wish85/wish process.
Two windows are spawned, one of them being the actual console.
I want to know how to force this behavior: closing the console should close the process. I tried to force a handler for the WM_DELETE_WINDOW message but it doesn't seem to work.
Can you guys help?
Upvotes: 0
Views: 928
Reputation: 15173
The console window runs in a different interp, so you have to install the protocol handler there. A way to do that is with
console eval {wm protocol . WM_DELETE_WINDOW exit}
The console implementation is in [file join $tk_library console.tcl]
(on my system C:/Tcl/lib/tk8.6/console.tcl), if you want to mess around there (not recommended).
Upvotes: 2