D
Daniel M. Drucker
Term:rompt appears to be either very badly broken ... or I'm
completely misreading the documentation.
Term:rompt's menuing system really doesn't seem to behave anything
like described in the documentation.
In this script, only the first prompt displays a menu at all, and
misnumbered, at that.
Can ANYONE tell me if I'm doing something wrong, or if this is a bug
in Term:rompt?
Daniel Drucker
(e-mail address removed)
#!/usr/bin/perl
use Term:rompt;
my @fruits = qw(apple orange pear tomato grapefruit apricot peach);
my $fruitnum = &prompt("m", {
prompt => "Choose:",
title => "Fruits",
items => [@fruits],
order => 'down',
accept_empty_selection => 0,
accept_multiple_selections => 0,
});
print "you chose " . $fruits[$fruitnum] . "\n";
print "\n=============\n";
my $fruitnum = &prompt("m", {
prompt => "Choose:",
title => "Fruits",
items => [@fruits],
order => 'down',
cols => 1,
accept_empty_selection => 0,
accept_multiple_selections => 0,
});
print "you chose " . $fruits[$fruitnum] . "\n";
print "\n=============\n";
my $fruitnum = &prompt("m", {
prompt => "Choose:",
title => "Fruits",
items => [@fruits],
order => 'across',
accept_empty_selection => 0,
accept_multiple_selections => 0,
});
print "you chose " . $fruits[$fruitnum] . "\n";
print "\n=============\n";
my $fruitnum = &prompt("m", {
prompt => "Choose:",
title => "Fruits",
items => [@fruits],
order => 'across',
rows => 1,
accept_empty_selection => 0,
accept_multiple_selections => 0,
});
print "you chose " . $fruits[$fruitnum] . "\n";
print "\n=============\n";
completely misreading the documentation.
Term:rompt's menuing system really doesn't seem to behave anything
like described in the documentation.
In this script, only the first prompt displays a menu at all, and
misnumbered, at that.
Can ANYONE tell me if I'm doing something wrong, or if this is a bug
in Term:rompt?
Daniel Drucker
(e-mail address removed)
#!/usr/bin/perl
use Term:rompt;
my @fruits = qw(apple orange pear tomato grapefruit apricot peach);
my $fruitnum = &prompt("m", {
prompt => "Choose:",
title => "Fruits",
items => [@fruits],
order => 'down',
accept_empty_selection => 0,
accept_multiple_selections => 0,
});
print "you chose " . $fruits[$fruitnum] . "\n";
print "\n=============\n";
my $fruitnum = &prompt("m", {
prompt => "Choose:",
title => "Fruits",
items => [@fruits],
order => 'down',
cols => 1,
accept_empty_selection => 0,
accept_multiple_selections => 0,
});
print "you chose " . $fruits[$fruitnum] . "\n";
print "\n=============\n";
my $fruitnum = &prompt("m", {
prompt => "Choose:",
title => "Fruits",
items => [@fruits],
order => 'across',
accept_empty_selection => 0,
accept_multiple_selections => 0,
});
print "you chose " . $fruits[$fruitnum] . "\n";
print "\n=============\n";
my $fruitnum = &prompt("m", {
prompt => "Choose:",
title => "Fruits",
items => [@fruits],
order => 'across',
rows => 1,
accept_empty_selection => 0,
accept_multiple_selections => 0,
});
print "you chose " . $fruits[$fruitnum] . "\n";
print "\n=============\n";