Re: Fwd: Element Positioning at start of INPUT ARRAY statement.
Posted in 1996
Dave: You may want to look at the Power-4gl package (see sig. for www address). In it is a module called "list.4gl" which does exactly what you want and more. Furthermore, the list handles an indefinite number of rows without taking up the memory resources that a display array or input array statement would. Here is a sample code segment using the list module: if listopen(title_name,"","","","") then call listsetup(table_lst,item_lst,format_str,where_cls,order_cls,"") while true call listman() returning action,row_key case action when "enter" if edit_row(row_key) then call listinit("") end if when "insert" if edit_row("") then call listinit("") end if when "delete" if del_row(row_key) then call listinit("") end if when "exit" exit while end case end while call listclose() end if This is a very intuitive way for users to manage their data. The Power-4gl package also includes other modules and general purpose functions, e.g. vertical menues, on-screen reports, help windows. The URL is "http://www.strengur.is/~frantz/pow4gl.html" where you can download a shareware version with sample programs. Write me if you want more information. marco greco wrote: > > Use an input array with all noentry fields and a dummy, invisible one. > You'll find the code you want, courtesy of Dennis J. Pimple, in the informix faq. > look at www.iiug.org. > --- On Sat, 15 Jun 1996 05:59:22 -0400 DMurray370@aol.com wrote: > [SNIP] > > For my current project it is necessary to: > 1) Display a result list > 2) Have the user select an item from the result list > 3) Take the user to an edit screen for the selected item > 4) Refresh the result list based on the edits the user made. > 5) Redisplay the result list for further selection > > Problem: In order to accomplish this, I am performing the same DISPLAY ARRAY > command in both steps 1 and 5. The DISPLAY ARRAY command assumes that your > always going to want to start from array position 1, so when I refresh my > result list and redisplay my list the user is automatically brought to the > top of the list. This is an issue because the user could have been at > item#250 and have to manually scroll all the way back to get to their > original position. > > ** Is there anyway to have the DISPLAY ARRAY start displaying the array a > specific > position or do I have to write my own version of the DISPLAY ARRAY > statement? > > Thanks > > Dave Murray > Albany, NY > > -----------------End of Original Message----------------- -- ---------------------------------------------------------------------- John H. Frantz Power-4gl: Extending Informix-4gl frantz@centrum.is http://www.strengur.is/~frantz/pow4gl.html