Thread Tk und POE: Querulanten-POE in Tk einsetzen (11 answers)
Opened by Froschpopo at 2005-04-06 16:11

Froschpopo
 2005-04-06 16:11
#43344 #43344
User since
2003-08-15
2653 Artikel
BenutzerIn
[default_avatar]
was ich als nächstes machen will ist folgendes:

Code: (dl )
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;


Warum funzt das nicht ?

Code: (dl )
1
2
Can't call method "configure" on an undefined value at poetest.pl line 28.
POE::Kernel's run() method was never called.
\n\n

<!--EDIT|Froschpopo|1112789806-->

View full thread Tk und POE: Querulanten-POE in Tk einsetzen