[comp.databases] dBase III+ menu programming question

SLORES@umiami.miami.edu (Stanislaw L. Olejniczak) (08/30/89)

I am sure it is a silly question, but I spent the whole day burrowing
through documentation, and I am nowhere closer an answer, so I though
someone in the NEWSland might be so kind to help.

In dBase III+ I would like to present a user with a menu, and then have
the user press one of the FUNCTION keys to choose a menu item.  I do know
I cannot reprogram F1, but I can live with that.  If possible, I would
also like very much to display running day's time on the display while
waiting for a keypress.

Some choices would cause an entry of a particular value into a memory
variable while others an execution of a procedure.

If this is reasonably well explained in the dBase iii+ manual, I could not
find it.  If you should be so kind as to reply, please assume I do have
manuals, and can find what native dBase III+ commands/functions do, but
that other than that I am a babe in the woods.

I would appreciate it if you would reply to me via email.  Thanks indeed
VERY MUCH for your help in advance.

----
Stan Olejniczak               Internet:         slores@umiami.miami.edu
University of Miami, FL USA   UUCP: (temp void) gould!umbio!solejni
SLORES@UMIAMI.BITNET          UUCP: (?)         umigw!gables!slores
Voice: (305) 547-6571         FAX: (305) 548-4612  
My opinions cannot possibly represent the views of anyone else!

mraustad@infocenter.UUCP (Mike Raustad) (09/05/89)

In article <2151@umiami.miami.edu>, SLORES@umiami.miami.edu (Stanislaw L. Olejniczak) writes:
> In dBase III+ I would like to present a user with a menu, and then have
> the user press one of the FUNCTION keys to choose a menu item.  I do know
> I cannot reprogram F1, but I can live with that.  If possible, I would
> also like very much to display running day's time on the display while
> waiting for a keypress.
>
     The SET FUNCTION command at menu startup will program your function
 keys.  As for displaying running day's time, I would like to know how to
 do this.  Does anyone have any ideas?

    ___________________________________________________________________________ 
   /  MIKE RAUSTAD __   ENCORE COMPUTER CORP.   /  6901 W. Sunrise Blvd.      /
  /\/\  o /  __   /__)  __          __/ __  ___/  Ft. Lauderdale, Fl. 33313  /
 / / / / /) (__  /  \  /_/ /  / /\   / /_/ /  /  PHONE: (305)-797-5621      /
/   /_/_/ \_(__ /   /_/ /_(__/_/__)_/_/ /_(__/ EMAIL: uunet!gould!mraustad /  

heflin@cod.NOSC.MIL (Greg R. Heflin) (09/06/89)

In article <3827@infocenter.UUCP> mraustad@infocenter.UUCP (Mike Raustad) writes:
>In article <2151@umiami.miami.edu>, SLORES@umiami.miami.edu (Stanislaw L. Olejniczak) writes:
>> In dBase III+ I would like to present a user with a menu, and then have
>> the user press one of the FUNCTION keys to choose a menu item.  I do know
>> I cannot reprogram F1, but I can live with that.  If possible, I would
>> also like very much to display running day's time on the display while
>> waiting for a keypress.
>>
>     The SET FUNCTION command at menu startup will program your function
> keys.  As for displaying running day's time, I would like to know how to
> do this.  Does anyone have any ideas?
>   /  MIKE RAUSTAD __   ENCORE COMPUTER CORP.   /  6901 W. Sunrise Blvd.      /

I'm unable to upload the code at the moment, so a verbal ramble will have
to suffice . . .
By looping with the INKEY() function, one can continuously compare keys
pressed against an acceptable set, doing anything one wants in the dead
time.  Here is an example code fragment:

DO WHILE .T.
	DO MENUMASK  * procedure to draw menu on screen
	i=0
	DO WHILE i=0
		i=INKEY()
		@ 17,63 SAY TIME()
		IF UPPER(CHR(i))$"ABCDEFGWZQ"
			EXIT
		ENDIF
		i=0
	ENDDO
	@ 23,58 SAY CHR(i)
	* process user's response
	DO CASE
		* test for exit
		CASE CHR(i) $"Zz"
			DO LOGOUT
	ENDCASE
ENDDO
**************************88
If you need more explicit info - drop me a line,
maybe by then I will be able to upload files again.

gregory
NAVELEX,SD
-- 

-gregory  Just my two cents which shouldn't make a flame,
	  unless you rub them real hard.

wew@naucse.UUCP (Bill Wilson) (09/06/89)

From article <2151@umiami.miami.edu>, by SLORES@umiami.miami.edu (Stanislaw L. Olejniczak):
> In dBase III+ I would like to present a user with a menu, and then have
> the user press one of the FUNCTION keys to choose a menu item.  I do know
> I cannot reprogram F1, but I can live with that.  If possible, I would
> also like very much to display running day's time on the display while
> waiting for a keypress.
>
You can use a while loop based on the function inkey to wait for a
key to be pressed.  All of the keys are returned as a value from
inkey().  F2 to F10 return -1 to -9.  I believe the values for other 
keys are listed in the manual (p 6-29).

 
-- 
Let sleeping dragons lie........               | The Bit Chaser
----------------------------------------------------------------
Bill Wilson             (Bitnet: ucc2wew@nauvm | wilson@nauvax)
Northern AZ Univ  Flagstaff, AZ 86011

SLORES@umiami.miami.edu (Stanislaw L. Olejniczak) (09/25/89)

In article <2151@umiami.miami.edu>, SLORES@umiami.miami.edu (Stanislaw L. Olejniczak) writes:
> In dBase III+ I would like to present a user with a menu


A summary has been posted under topic:

DBase III+ menus - a summary (long)

STan