1. Getting user's choices from a menu

I'd appreciate some ideas about user-friendly and fool-proof ways of doing
this:
1    present the user with a menu of choices (not mutually exclusive):
eg   MENU OF USER CHOICES
     A   this
     B   that
     C   other

2    get user's choice(s):
eg   ENTER THE LETTER (A,B,C) OF YOUR CHOICE(S):

3    suppose the choices are A and C. Is it preferable to read them as a
"unit", or as separate items? Should I insist on spaces between choices? If
so, what happens if the user enters AC instead of A C? What if the menu
choices were numerals (1,2,3) instead of letters? Would the code differ?
Would there be any different issues to take into account?

Thank you

Alex Caracatsanis

new topic     » topic index » view message » categorize

2. Re: Getting user's choices from a menu

On Sat, 12 Aug 2000, you wrote:
> I'd appreciate some ideas about user-friendly and fool-proof ways of doing
> this:
> 1    present the user with a menu of choices (not mutually exclusive):
> eg   MENU OF USER CHOICES
>      A   this
>      B   that
>      C   other
>
> 2    get user's choice(s):
> eg   ENTER THE LETTER (A,B,C) OF YOUR CHOICE(S):
>
> 3    suppose the choices are A and C. Is it preferable to read them as a
> "unit", or as separate items? Should I insist on spaces between choices? If
> so, what happens if the user enters AC instead of A C? What if the menu
> choices were numerals (1,2,3) instead of letters? Would the code differ?
> Would there be any different issues to take into account?

The user-friendly way to do this would be with a series of checkboxes.
There's a small (5k) file in the Euphoria archives which provides this and
other simple controls for DOS or Linux - search for "simple text mode
interface".

Regards,
Irv

new topic     » goto parent     » topic index » view message » categorize

3. Re: Getting user's choices from a menu

If you could construct something like this , that's easy to setup and
  use , you'd have a number of persons interested .
   This is probably something that many attempt at sometime , I know I
  have ,  with varying degrees of success.
   The conceptual difficulty is in making a generally usable , easily
  constructed menu.


On 2000-08-13 EUPHORIA at LISTSERV.MUOHIO.EDU said:
 EU>I'd appreciate some ideas about user-friendly and fool-proof ways
 EU>of doing this:
 EU>1    present the user with a menu of choices (not mutually
 EU>exclusive): eg   MENU OF USER CHOICES
 EU>A   this
 EU>B   that
 EU>C   other
 EU>2    get user's choice(s):
 EU>eg   ENTER THE LETTER (A,B,C) OF YOUR CHOICE(S):
 EU>3    suppose the choices are A and C. Is it preferable to read them
 EU>as a "unit", or as separate items? Should I insist on spaces
 EU>between choices? If so, what happens if the user enters AC instead
 EU>of A C? What if the menu choices were numerals (1,2,3) instead of
 EU>letters? Would the code differ? Would there be any different issues
 EU>to take into account?
 EU>Thank you
 EU>Alex Caracatsanis

Net-Tamer V 1.11 - Test Drive

new topic     » goto parent     » topic index » view message » categorize

4. Re: Getting user's choices from a menu

On 13 Aug 2000, at 3:41, Beaumont Furniss wrote:

>    If you could construct something like this , that's easy to setup and
>   use , you'd have a number of persons interested .
>    This is probably something that many attempt at sometime , I know I
>   have ,  with varying degrees of success.
>    The conceptual difficulty is in making a generally usable , easily
>   constructed menu.

I understand the concept. smile

>
> On 2000-08-13 EUPHORIA at LISTSERV.MUOHIO.EDU said:
>  EU>I'd appreciate some ideas about user-friendly and fool-proof ways
>  EU>of doing this:
>  EU>1    present the user with a menu of choices (not mutually
>  EU>exclusive): eg   MENU OF USER CHOICES
>  EU>A   this
>  EU>B   that
>  EU>C   other
>  EU>2    get user's choice(s):
>  EU>eg   ENTER THE LETTER (A,B,C) OF YOUR CHOICE(S):
>  EU>3    suppose the choices are A and C. Is it preferable to read them
>  EU>as a "unit", or as separate items? Should I insist on spaces
>  EU>between choices? If so, what happens if the user enters AC instead
>  EU>of A C? What if the menu choices were numerals (1,2,3) instead of
>  EU>letters? Would the code differ? Would there be any different issues
>  EU>to take into account?

Easy, since you know what you are looking for, throw away everything else. Then
make the remaining items into the form you'd like, regardless of what they are,
then
pass that to your input.

user: a,B,c
program: upcase alphabet, delete all non-alphanumeric(,";;'<>,./?, spaces, etc)

user: 1 2 3
program: upcase alphabet, delete all non-alphanumeric(,";;'<>,./?, spaces, etc)

user: a 5, X
program: upcase alphabet, delete all non-alphanumeric(,";;'<>,./?, spaces, etc)

UNTESTED ( translated to Eu from mirc )

for loop = 1 to length(input) do
   inputseg = mid(input,loop,1)
   intermediatetemp = findtok(" A B C 1 2 3  ", inputseg ,1,32)
   if ( intermediatetemp != 0 ) then
-- assuming a=1 b=2 and c=3, if not, then use other id#'s or something in the
following
line,, i'm just parsing the possible random input from user.
NeedToDo  =  gettok(" routineid1 routineid2 routineid3 routineid1
       routineid2
routineid3 " , intermediatetemp ,32)
-- here, do something with NeedToDo, save it, exec it, display it, or
       something.
-- Robert, this would be a great place for a "gosub(sequence
SomeValidRoutineName)"
 or an "exec(sequence SomeVariableTheProgramMade)",
something that makes the routineid() setup/calls transparently to the
programmer.
   end if
end for


Kat,
loving those string routines in strtok.e

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu