#$dialog -> protocol( 'WM_DELETE_WINDOW'=>sub {exit(); } );