#!/usr/bin/perl use warnings; use strict; use Tk; require Tk::ErrorDialog; my $mw = new MainWindow; $mw->title("Close test"); $mw->geometry("400x250"); #prevents mw from closing $mw->protocol('WM_DELETE_WINDOW' => \&save_it ); $mw->after(2000, sub{ die } ); MainLoop; sub save_it { print "do stuff here before the exit\n"; $mw->messageBox(-message=>"you tried to exit!"); }
In reply to Re^2: Die vs. Exit
by zentara
in thread Die vs. Exit
by shortyfw06
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |