Re: 4GL spreadsheet?
Posted in 1996
batonnet@zeta.org.au (Bryan Tonnet) wrote: :Anyone tried to simulate spreadsheet behaviour using 4GL? :Specifically, I have a customer who wants to do the following (on :character based terminals); :Load an (unknown) number of people on an X-axis. :Load an (unknown) number of job numbers on a Y-axis. :Use the arrow keys to move around (and off) the screen, plugging in daily :times against people/jobs. :I'm not sure of the best way to approach this, so if anyone's got any :bright-ideas/code-they-are-willing-to-part-with, it would save a :shovel-load of effort. Although there is no good solution you *might* be able to achieve what you want. First check out the example in the faq in "4.1.4 How can I force INPUT ARRAY onto the next line?". This is just to give you some ideas on what you can do with input array. In you .per file you might start out with defining an array accross the top to display some of your people. Under this you create the array to do the input. The leftmost element of this would contain the job number in a noentry field. The supporting program array would be large enough to hold the maximum number of jobs. (I assume this is no more than a few hundred. If it is a different approach *might* be better using an array only the size of your screen array.) This program array however only contain the number of elements "horisontally" that can be displayed on the screen. You create one big array large enough to contain all people and jobs an fill this from the database. When you start up you fill the array used in the input array statement from the left part of the big array. You then trap key movements (and possibly/probably use the fgl_lastkey function) as described in the faq. However this time you don't use them for moving to the right vertical position (you remove that part of the code). Instead you use it to exit the input array statement, fill the big program array from the input array (to save changes if there are any), then fills the input array from the big program array and redisplays the appropriate headers. All this *might* just work. I haven't tested it, and it would require a fast terminal connection. (At 9600 baud it would probably frustrate the users somewhat.) Nils.Myklebust@idg.no NM Data AS, P.O.Box 9090 Gronland, N-0133 Oslo, Norway My opinions are those of my company The Informix FAQ is at http://www.iiug.org