Re: help with a script



Le Wed, 17 Apr 2002 15:39:59 -0500
Paul Rech <rechpj bitstream net> a ecrit:

Hi everyone,

I want to write an app in perl-gtk and I'm just starting out learning 
the GTK part.

Can someone tell me how to close a window without closing the whole
program? I use :
$window->destroy()
 
Here is my sample script.
I know it's wretched.  I'm just writing snippets to test out the
widgets and learn more.

The part I'm trying to figure out is the line right below the string
"XXXX".

# XXXX
   $button->signal_connect( "pressed", sub { $window->destroy(); } );

That button called "forms" would pop open a list of forms for a user
to do things to.  Then closing that window would save the new data or 
perform some other act.

you can do a callback function save and change the script : 

$window->signal_connect( "destroy", \&save , ..here the data to save..);
 
Thanks,

Paul Rech

-- 
Gauthier Monserand
simkim simkim dyndns org



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]