Thread MainWindow vererben??? (8 answers)
Opened by Gast at 2005-07-19 12:34

renee
 2005-07-19 12:46
#44189 #44189
User since
2003-08-04
14371 Artikel
ModeratorIn
[Homepage] [default_avatar]
Das hier funktioniert:

Skript:
Code: (dl )
1
2
3
4
5
6
7
8
9
#!/usr/bin/perl

use strict;
use lib qw(.);
use my_tk qw(MainLoop);

my $fenster = my_tk->new();

MainLoop();


my_tk.pm:
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package my_tk;

require Exporter;
our @EXPORT = qw(MainLoop);

use base 'Tk';
sub new {
my $class = shift;
my $self = MainWindow->new(@_);
# ggf. mach was mit $self
return $self;
}

sub MainLoop{
Tk::MainLoop();
}

1;
OTRS-Erweiterungen (http://feature-addons.de/)
Frankfurt Perlmongers (http://frankfurt.pm/)
--

Unterlagen OTRS-Workshop 2012: http://otrs.perl-services.de/workshop.html
Perl-Entwicklung: http://perl-services.de/

View full thread MainWindow vererben???