blob: a9b31a01746a7d9654362166b442fb3393373c87 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#!/usr/bin/perl -w
#use lib '/home/mertz/CODE/lib/ivy-perl';
#BEGIN { print "INC = @INC\n";}
use strict;
use Tk;
use Ivy;
#print "INC = @INC\n";
Ivy->init('-loopMode' => 'TK', '-appName' => 'toto');
my $ivy = Ivy->new();
$SIG{HUP} = $SIG{TERM} = $SIG{QUIT} = $SIG{INT} = $SIG{STOP} = $SIG{KILL} = 'quit';
my $mw = MainWindow->new;
my $b = $mw->Button(-text => 'Un bouton', -command => \&quit)->pack();
$ivy->start;
Tk::MainLoop;
sub quit {
#$b->destroy;
#$mw->destroy;
print "Avant Ivy::stop\n";
Ivy::exit();
#print "Apres Ivy::stop\n";
#Tk::exit();
}
1;
|