Leser: 1
|< 1 2 >| | 12 Einträge, 2 Seiten |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use Tk;
$mw = MainWindow->new;
$mw->Label(-text => "Hier kommt das eingebettete Fenster:")->pack;
$f = $mw->Frame(-container => 1)->pack;
my $id = $f->id;
warn $id;
$mw->update; # wichtig, Fenster muss gemappt sein!
if (fork == 0) {
$mw2 = MainWindow->new(-use => $id);
$mw2->Label(-text => "Das andere Fenster")->pack;
MainLoop;
CORE::exit();
}
MainLoop;
1
2
3
4
0x1003a0 at C:\Daten\perl\tk-Programm-in-Programm.pl line 10.
24341b8 is not a hash at C:/Perl/site/lib/Tk/MainWindow.pm line 55.
abnormal program termination
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/perl
use strict;
use warnings;
use Tk;
my $mw = new MainWindow;
$mw->Label(-text => "Hier kommt das eingebettete Fenster:")->pack();
my $f = $mw->Frame(-container => 1)->pack();
my $id = $f->id;
warn $id;
$mw->update; # wichtig, Fenster muss gemappt sein!
if (fork == 0) {
my $mw2 = MainWindow->new(-use => $id);
$mw2->Label(-text => "Das andere Fenster")->pack();
MainLoop();
CORE::exit();
}
MainLoop();
1
2
3
perl -w tk-Programm-in-Programm.pl
0x3200007 at tk-Programm-in-Programm.pl line 10.
Xlib: unexpected async reply (sequence 0x6b)!
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
#!/usr/bin/perl
use strict;
use warnings;
use Tk;
pipe(RDR,WTR);
if (fork == 0) {
close WTR;
chomp(my $id = scalar <RDR>);
close RDR;
my $mw2 = MainWindow->new(-use => $id);
$mw2->Label(-text => "Das andere Fenster")->pack();
MainLoop();
CORE::exit();
}
close RDR;
my $mw = new MainWindow;
$mw->Label(-text => "Hier kommt das eingebettete Fenster:")->pack();
my $f = $mw->Frame(-container => 1)->pack();
my $id = $f->id;
$mw->update; # wichtig, Fenster muss gemappt sein!
print WTR "$id\n";
close WTR;
MainLoop();
1
2
3
243e488 is not a hash at C:/Perl/site/lib/Tk/MainWindow.pm line 55.
abnormal program termination
1
2
3
1d683dc is not a hash at C:/Perl/site/lib/Tk/MainWindow.pm line 55.
abnormal program termination
|< 1 2 >| | 12 Einträge, 2 Seiten |