gri6507 has asked for the wisdom of the Perl Monks concerning the following question:
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?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Tk & Xwin event order
by chromatic (Archbishop) on May 25, 2004 at 23:18 UTC |