in reply to Re: Tkx::__tkwait nightmare
in thread Tkx::__tkwait nightmare

Will do. Thanks.

Replies are listed 'Best First'.
Re^3: Tkx::__tkwait nightmare
by previous (Sexton) on Mar 09, 2016 at 18:15 UTC
    Unfortunately all simplified models worked fine so...not representative. However, I solved my problem using the debugger + a shotgun approach on the real program. I noticed that when I closed the window via the window's std top right X button using the mouse... tkwait saw it fine. I wondered how that was different to my Escape key handler which simply invoked $win->g_destroy. I tried to see what happened from cicking the mouse in the top right X but couldn't easily stop the debugger just before that. I did however note that when I used a keyhandler...I seemed stuck in the event loop. All I did to solve the problem was insert a couple of returns in the call handler i.e. to prevent the code from hitting next which in Tcl terms seems equivalent to break which prevents further processing in the event loop. I'd have thought next was exactly what I needed but it seemed to keep me in the event loop...not let my own code continue. Irrespective it works now and I got some much neeeded debuggger experience. I like that you can script it's operation like gbd...Fantastic.