4 Einträge, 1 Seite |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/perl
use strict;
use warnings;
use Curses;
use Curses::Widgets;
use Curses::Widgets::TextField;
my $widget;
my $mwh = new Curses;
noecho();
curs_set(0);
WIDGET:
my $widget = Curses::Widgets::TextField->new({
Y => 4,
X => 14,
COLUMNS => 20,
MAXLENGTH => 30,
FOREGROUND => 'green',
BACKGROUND => 'blue',
BORDERCOL => 'black',
BORDER => 1,
CAPTION => 'Ihre Eingabe',
CAPTIONCOL => 'yellow',
});
$widget->draw($mwh, 0);
$widget->execute($mwh);
if ($widget->getField('VALUE') eq "exit")
{
endwin();
exit 0;
} else {
goto WIDGET;
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/perl
use strict;
use warnings;
use Curses;
use Curses::Widgets;
use Curses::Widgets::TextField;
my $widget;
my $mwh = new Curses;
noecho();
curs_set(0);
do
{
my $widget = Curses::Widgets::TextField->new({
Y => 4,
X => 14,
COLUMNS => 20,
MAXLENGTH => 30,
FOREGROUND => 'green',
BACKGROUND => 'blue',
BORDERCOL => 'black',
BORDER => 1,
CAPTION => 'Ihre Eingabe',
CAPTIONCOL => 'yellow',
});
$widget->draw($mwh, 0);
$widget->execute($mwh);
} while ($widget->getField('VALUE') ne "exit");
endwin();
exit 0;
Can't call method "getField" on an undefined value at ./text.pl line 16.
4 Einträge, 1 Seite |