%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):
QuoteReference 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)