On Fri, 08 Aug 2003 11:07:53 +0530, [EMAIL PROTECTED] (Sachin Hegde) wrote:
>Hi all, >I am writing an UI application inPerl/Tk. I have some functions which I am >supposed to run before the application closes. How do I calll this function, >say Funct(), when the user clicks on the close icon of the window? >Sachin Something like this: #!/usr/bin/perl use warnings; use strict; use Tk; my $mw = new MainWindow; $mw->title("Close test"); $mw->geometry("400x250"); #prevents mw from closing $mw->protocol('WM_DELETE_WINDOW' => sub { Funct(); exit;} ); MainLoop; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]