Thread der wievielte durchlauf einer for schleife? (12 answers)
Opened by vayu at 2005-10-21 19:42

vayu
 2005-10-21 20:12
#59118 #59118
User since
2005-01-13
782 Artikel
BenutzerIn
[default_avatar]
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
%labels = {
"lab1" => $frm_name->Label(-text=>"Server name:"),
"ent1" => $frm_name->Entry(),
"lab2" => $frm_name->Label(-text=>"Server domain:"),
"ent2" => $frm_name->Entry(),
"lab3" => $frm_name->Label(-text=>"User name:"),
"ent3" => $frm_name->Entry(),
"lab4" => $frm_name->Label(-text=>"Password:"),
"ent4" => $frm_name->Entry()
};
for(1..4) {
$labels{'lab'.$_}->pack();
$labels{'ent'.$_}->pack();
}


hmmm .. das gibt mir leider nen undef hash zurück O.o

Fehlermeldung (Zeile 64 ist da wo mein code beginnt):

Quote
Reference found where even-sized list expected at pin-mail.pl line 64.
Tk::Error: Can't call method "pack" on an undefined value at pin-mail.pl line 76
.
Tk callback for .frame
main::addNewMailAccount at pin-mail.pl line 76
Tk callback for .button1
Tk:: at C:/Perl/site/lib/Tk.pm line 252
Tk::Button::butUp at C:/Perl/site/lib/Tk/Button.pm line 111
<ButtonRelease-1>
(command bound to event)

View full thread der wievielte durchlauf einer for schleife?