Re: Informix 4GL Screen Question. Top/Bot possible?
Posted in 1997
In article <32F9A1AE.B79@west.co.za> marks@west.co.za writes: >Raju Matthew Kallarackal wrote: >> >> In Informix 4GL: >> >> within the Input Array Construct, >> >> has anyone implemented a Top / Bottom Feature >> to do a fast-step to the top or bottom of the array. >> I almost expected that to be built in along with >> NEXT and PREVIOUS. >> >> I could not figure a way to change the internal representation >> for CURRENT Row. >> >> Any tip would be appreciated. > >The tip is don't use INPUT ARRAY. :-) > >Use a standard SCROLL CURSOR with an ARRAY form. Put a menu across the >top, with NEXT, PREV, FIRST, LAST..., etc. Map the cursor keys to NEXT >and PREV, then use the SCROLL command to move things up or down and >display the appropriate record in the blank. If you're clever, you can >then implement the skip routine lost in PERFORM, so that 4P or >4<UP ARROW> will move you 4 records up etc. I don't agree. What I've done is define a 14 row array filled by a foreach loop from a scroll cursor. The INPUT ARRAY is inside a WHILE TRUE loop. Then you can implement HOME, END, SEARCH etc etc by exiting the INPUT ARRAY, filling the array with new data via the scroll cursor (in a function call, naturally) and then bouncing to the top of the WHILE TRUE loop to reenter the INPUT ARRAY. Lots of variations possible on this but it does work. I've been using it with 4GL since 1990. Peter Wiley