Re: Moving cursor during input statements in 4GL
Posted in 1993
->From: knutv@Hadrian.Boers.no (Knut Espen Vonheim) ->Subject: Moving cursor during input statements in 4GL ->Date: 23 Sep 1993 15:12:18 +0200 ->Reply-To: knutv@Hadrian.Boers.no (Knut Espen Vonheim) ->Organization: Oslo B|rs Informasjon ->Sender: informix-list-owner@rmy.emory.edu -> ->Good afternoon!! -> ->During INPUT ARRAY statements, I would like to move the cursor to the beginning ->of both the screen array and the program array when the user moves the cursor ->to the first row beyond the last filled row of the program array. -> ->I have a program array that has x number of rows in the first column filled ->with data, and the user will fill the remaining columns. -> ->COL1 COL2 COL3 COL4 ROW# -> x y y y 1 -> x y y y 2 -> x y y y 3 -> x y y y 4 -> x y y y 5 -> z z z z 6 -> z z z z 7 -> z z z z 8 -> ->The x's are select form a table and inserted into col1 of the program array, ->while the user will fill in the y's during the input array statement. The z's ->are not supposed to be touched by the user. -> ->The input statement could look something like this: -> ->----- -> ->INPUT ARRAY program_array -> FROM screen_array.* -> WITHOUT DEFAULTS -> AFTER FIELD col4 -> NEXT FIELD col2 -> BEFORE ROW -> IF (#_of_x's + 1) = arr_curr() THEN -> {move cursor to screen line 1, program_array[1]} -> END IF ->END INPUT -> ->----- -> ->Does anybody know how to do this? Can it be done in 4GL? ->Any help, hints, or pointers are highly appreciated!! -> ->Sincerely -> ->SoM -> ->PS! I would like to thank Mr. Parker and Mr. Sargent for answering my -> last posting. Thank you very much! -> ->--------------------------------------------------------- ->From: Knut E. Vonheim Sign.: SoM ->Comp: A/S OBI ->Addr.: Fred Olsensgt. 1 -> 0102 Oslo -> Norway tlf: + 47 22 34 18 06 ->e-mail knutv@boers.no Beeper: + 47 096 99357 ->--------------------------------------------------------- There is no really *clean* way to do what you want within the INPUT ARRAY. The following code is only a little messy and should be close to what you want: LET redisplay = TRUE WHILE redisplay { Each time thru the loop, the display starts at row 1. } INPUT ARRAY program_array FROM screen_array.* WITHOUT DEFAULTS AFTER FIELD col4 NEXT FIELD col2 BEFORE ROW IF arr_curr() >= (#_of_x's + 1) THEN EXIT INPUT { This gets out of the INPUT, but not the WHILE. } END IF ON KEY (whatever) { Your end-of-data-entry key. } LET redisplay = FALSE { This causes the WHILE to terminate. } EXIT INPUT END INPUT END WHILE { redisplay } Regards, Alan ___________________________ ______________________| R. Alan Popiel |__________________________ \\ Internet: | Martin Marietta, Tech Ops | / \\ alan@den.mmc.com | P.O. Box 179, M/S 5422 | Std disclaimers apply. / )Voice: | Denver, CO 80201-0179 USA | ( / 303-977-9998 |___________________________| (But you knew that!) \\ /________________________) (____________________________\\