RE: Display array highlist
Posted in 1992
Topics: Stored Procedures & SPL, Connectivity: ESQL/C, 4GL & Embedded SQL
Bunches of stuff deleted... >> Quoting Randall Rhea... >> } >> } shemminga@cix.compulink.co.uk (Stuart Hemming) writes: >> } >> } >I apologise if this is an FAQ but is it possible, using 4GL and SE >> } >under Inactive unix, to have the entire screen record highlighted (in >> } >reverse video) when moving up and down in display array? >> } >> } No, but you can use an INPUT ARRAY. Put INPUT ARRAY inside of >> } a WHILE loop. In the BEFORE FIELD clause, do a DISPLAY ATTRIBUTE(REVERSE) , >> } then a regular DISPLAY in the AFTER FIELD clause. >> } >> If only it were that simple! You need to disable the INSERT and DELETE keys , >> not allow ADDING of data at the end of the list, and not allow UPDATING of t h >e >> data that is already there. There is definately alot of "behind the scenes" >> coding that has to be done. >> >I have a suggestion for you that makes this much simpler. Include an extra >field both in the screen array and program array for "cursor control". Define >all of the fields except the extra "cursor control" field as NOENTRY in the >form file. Define the cursor control field with a PICTURE = " ". Now the >data cannot be changed, and nothing can be entered in the cursor control field . > >You still have to disable insert and delete. And you have to keep the cursor >from scrolling off the end of the list. The best way I've found to do this is >by checking the current array position against the total number of records in >the array in the AFTER FIELD logic of the cursor control field. >For example: > > AFTER FIELD cursor_control > IF array_current = total_records > THEN > ERROR "There are no more records in the direction you are going!" > NEXT FIELD cursor_control > END IF > >Hope this helps. > >Chris S. Stuart, Dave, Randall, Chris.. We've had to do this in several instances when the customer wanted to make extensive use of pick lists and wanted the whole thing to look more like a DOS app. In addition to what has been already mentioned, what we also found was that putting the whole thing into a WHILE LOOP and having the user reenter the array at the top after he left the bottom. But, as Dave mentioned this is not without some pretty extensive coding and anticipation of the wierd things the user can do and/or keys they can press (F2, F1, etc), lots of work, but it can be done. On the other hand, there is way to do this (Better?) using the array function, bunches of display statements, and Dave's cursor key trap functions from DBGEN (slao maybe in 4.1??, don't know). A colleague ended up using Dave's DBGEN lib routines to create the same functionality but with cleaner coding and implementation. Primarily he used the cursor key trap functions and was able to duplicate the functionality plus take care of some of the limitations, if not all. If you prefer using INPUT ARRAY, be aware of the fact that we had problems when the cursor control field was placed somewhere other than the far right side, essentially the last field in a row. I still have some code somewhere that uses this implementation, if you're interested. My friend also gets the list and when he sees this thread he will more than likely post, if anyone is interested. I guess 4.1 has some of the cursor key trap routines in it, but if you don't have it (we don't) most of the stuff can be found in Dave's DBGEN. Here's your chance Dave. !:^' Hope this is of some help. ____________________________________________ ________ _____ ___/__. ' ____ (__ '__ _ (_ / (___/ / /_______)__(_(__(_(_(-'_/~ ____________________________________________ Jim Sauer sauerj@heidelberg-emh2.army.mil