|< 1 2 >| | 12 Einträge, 2 Seiten |
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
29
30
31
32
33
#! /usr/bin/perl -w
use Tk;
use POE qw(Session);
my $main = MainWindow->new(
-title => "Ein kleiner test"
);
POE::Session->create( 'inline_states' =>
{ '_start' => \&test
},
'args' => [ "hi" ],
);
my $text = $main->Label(
-text => "Jede Sekunde eine neue Zahl",
-width => 10,
-height=> 10
)->pack();
sub test {
for (1..5) {
sleep(1);
$text->configure(-text => $_);
}
}
POE::Kernel->run();
MainLoop;
1
2
Can't call method "configure" on an undefined value at poetest.pl line 28.
POE::Kernel's run() method was never called.
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
29
30
31
32
33
34
35
36
37
38
39
40
41
#! /usr/bin/perl -w
use Tk;
use POE qw(Session);
my $main = MainWindow->new(
-background => 'white',
-title => "Ein kleiner test"
);
my $text = $main->Label(
-text => "Jede Sekunde eine neue Zahl",
-width => 10,
-height=> 10
)->pack();
POE::Session->create( 'inline_states' =>
{ '_start' => \&test
},
'args' => [ "hi" ],
);
sub test {
for (1..5) {
sleep(1);
conf($_);
}
}
POE::Kernel->run();
sub conf {
$text->configure(-text => $_[0]);
}
MainLoop;
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
29
30
31
#! /usr/bin/perl -w
use Tk;
use POE qw(Session);
my $main = MainWindow->new(
-background => 'white',
-title => "Ein kleiner test"
);
POE::Session->create( 'inline_states' =>
{ '_start' => \&test
},
'args' => [ "hi" ],
);
sub test {
for (1..5) {
conf($_);
sleep(1);
}
}
POE::Kernel->run();
sub conf {
$main->configure(-title => $_[0]);
}
MainLoop;
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
29
30
31
#! /usr/bin/perl -w
use Tk;
use POE qw(Session);
my $main = MainWindow->new(
-background => 'white',
-title => "Ein kleiner test"
);
POE::Session->create( 'inline_states' =>
{ '_start' => \&test
},
'args' => [ "hi" ],
);
sub test {
for (1..5) {
conf($_);
sleep(1);
}
}
POE::Kernel->run();
sub conf {
$main->configure(-title => $_[0]);
}
MainLoop;
|< 1 2 >| | 12 Einträge, 2 Seiten |