I have a Tk program that catches the Xwin "close window" event: $mw->protocol('WM_DELETE_WINDOW', sub {my_exit()});. However, when sometime down the road in the program a bad thing happens and I call die "bad thing happened: $!\n";, the program terminates, the windown obviously is removed, but my_exit() function is not executed. I had to put in a signal catcher $SIG{__DIE__}=sub{my_exit()}; in order to do what I wanted.
Why is that? Why doesn't the 'die' force the WM_DELETE_WINDOW event to be caught?
In reply to Tk & Xwin event order by gri6507
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |