Re: 4gl: display array - question
Posted in 1991
Topics: Stored Procedures & SPL, Connectivity: ESQL/C, 4GL & Embedded SQL
The DISPLAY ARRAY statement can pretty much be emulated with the INPUT ARRAY command. For example, I use: program_array RECORD dummy_char CHAR(1), menu_line CHAR(50) END RECORD The screen array has an AUTONEXT on the dummy_char attribute, and blocks editing of the menu_line field. In your BEFORE ROW clause, display the row in reverse video. In your AFTER ROW clause, display the row in normal video. You do have to watch out for the user going past the end of the array (making Informix think that you're inputting new records). A cheesy way of preventing this is load your data into the bottom most records, and use the NEXT FIELD to a display only field to prevent users from entering data near the top. In most of my applications, I allow the user to go beyond the bottom, but I display a message telling them that there is nothing more to be found and to go back up (you can force Informix to move down an input array, but not back up). I do hope all this makes sense... I use this method for creating light-bar menus all the time. Lee Brintle, Advantage Information Management Iowa City, IA