Leser: 1
7 Einträge, 1 Seite |
1
2
my $menuMain=menuClass->new();
$menuMain->InitMenuFunc (\&main::Test0, \&main::Test1);
1
2
3
4
5
6
7
8
9
sub InitMenuFunc {
my $self=shift;
# print "self: " . $self . "\n";
my $idx = 0;
foreach my $element ( @_ ) {
$self->{$menuFunc[$idx]} = $element;
$idx++;
}
}
1
2
3
4
5
6
7
8
9
sub InitMenuFunc {
my $self=shift;
# print "self: " . $self . "\n";
my $idx = 0;
foreach my $element ( @_ ) {
$self->{menuFunc}->[$idx] = $element;
$idx++;
}
}
1
2
3
4
5
6
7
sub GetMenuLines {
my $self = shift;
my $idxFunc = shift;
# my $ref = $self->{menuFunc}->[$idxFunc];
# &$ref;
&{$self->{menuFunc}->[$idxFunc]};
}
@{$self->{menuLines}} = @_;
1
2
3
4
5
6
7
sub GetMenuLines {
my $self = shift;
my $idxFunc = shift;
# my $ref = $self->{menuFunc}->[$idxFunc];
# &$ref;
&{$self->{menuFunc}->[$idxFunc]};
}
@{$self->{menuLines}} = @_;
@{$self->{menuLines}} = @_;
7 Einträge, 1 Seite |