1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
sub Programm_Verlassen
{
# Dialog Ja Nein
my $dialog = $window->Dialog(-text => 'Wollen Sie wirklich beenden?',
-bitmap => 'question',
-title => 'Quit?',
-default_button => 'Ja',
-buttons => [qw/Ja Nein/],
); # Dialog
my $answer = $dialog->Show();
if ($answer =~ /j/i){
print "\nEs wurde ja ausgewaehlt.\n";
exit(0);
} # if
else {
print "\nEs wurde nein ausgewaehlt.\n";
} # else
}
1
2
3
4
5
6
7
8
9
Assuming 'require Tk::Dialog;' at /Library/Perl/5.12/darwin-thread-multi-2level/Tk/Widget.pm line 337
Tk::Widget::AUTOLOAD('MainWindow=HASH(0x7fb94c432c20)', '-text', 'Wollen Sie wirklich beenden?', '-bitmap', 'question', '-title', 'Quit?', '-default_button', 'Ja', ...) called at deskpad_german_bearbeitet line 1315
main::Programm_Verlassen() called at deskpad_german_bearbeitet line 1299
main::__ANON__() called at /Library/Perl/5.12/darwin-thread-multi-2level/Tk.pm line 251
eval {...} called at /Library/Perl/5.12/darwin-thread-multi-2level/Tk.pm line 251
Tk::__ANON__('Tk::Button=HASH(0x7fb94c29eeb8)') called at /Library/Perl/5.12/darwin-thread-multi-2level/Tk/Button.pm line 175
Tk::Button::butUp('Tk::Button=HASH(0x7fb94c29eeb8)') called at /Library/Perl/5.12/darwin-thread-multi-2level/Tk.pm line 424
eval {...} called at /Library/Perl/5.12/darwin-thread-multi-2level/Tk.pm line 424
Tk::MainLoop() called at deskpad_german_bearbeitet line 1373
use Tk::Dialog;