Thread threads: unblessed reference...: in Verbindung mit Tk (1 answers)
Opened by Froschpopo at 2005-04-08 05:52

Froschpopo
 2005-04-08 05:52
#53590 #53590
User since
2003-08-15
2653 Artikel
BenutzerIn
[default_avatar]
ich bekomme folgende Meldung:

thread failed to start: Can't call method "configure" on unblessed reference at
tktest.pl line 20.

und so sieht das Programm aus:

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
#!/usr/bin/perl

use warnings;
use strict;

use threads;
use threads::shared;
use Tk;

my %config = ();

$config{MainWindow} = MainWindow->new();

share(%config);


my $th_inc = threads->new( \&kind );

sub kind {
$config{MainWindow}->configure(-title => "Neuer Titel");
return 0;
}

MainLoop();

View full thread threads: unblessed reference...: in Verbindung mit Tk