The fields of a ".per" screen disappear
Posted in 2011
Topics: Stored Procedures & SPL, Connectivity: ESQL/C, 4GL & Embedded SQL
Hi, I had a compilation error using the "cperf" command to generate a specific "sperform" program (which allow to call C functions from a ".per" file). This error was resolved here: http://www.iiug.org/forums/classics/index.cgi/read/4082 I'm using ISQL 7.50FC5 instead of ISQL 7.50FC2, and I can now generate my "sperform" program. I have another problem now. In an instruction "before field" in my screen (.per) I call a function C (define in my "sperform" program) which call a 4GL program. The 4GL program open a form in which the user select a value, this value is copied in a field of the original screen (.per). When the user exit the 4GL program, he return to the ".per" screen, but all the fields (delimited by "[]") disappear. The user can navigate in the screen but without seeing anything. This problem is solved with "Ctrl+R" which refresh the screen. Do you know how to display correctly the fields of the ".per" screen when the user exit the 4GL program, without using "Ctrl+R" ? Thank you
On Fri, Nov 25, 2011 at 01:34, OLIVIER CONSULTIX < olivier.calmettes@consult-ix.fr> wrote: > [...] > I have another problem now. In an instruction "before field" in my screen > (.per) I call a function C (define in my "sperform" program) which call a > 4GL > program. > The 4GL program open a form in which the user select a value, this value is > copied in a field of the original screen (.per). > > When the user exit the 4GL program, he return to the ".per" screen, but all > the fields (delimited by "[]") disappear. The user can navigate in the > screen > but without seeing anything. > This problem is solved with "Ctrl+R" which refresh the screen. > > Do you know how to display correctly the fields of the ".per" screen when > the > user exit the 4GL program, without using "Ctrl+R" ? > There is an assumption that the code executed in a function will not be messing with the screen display. It won't be writing to stdout or stderr, and it won't be dinking with terminal attributes. In theory, it would be possible to simply redraw the screen on return from a called function; the downside is that it would produce flickering effects which would be annoying. If this is going to be a recurrent problem, then it might be feasible to add a mechanism - perhaps CALL function(...args...) AND RESTORE SCREEN - to cater for circumstances like this. You would have to make a business case for it. (See also I4GL's RUN ... IN {SCREEN | FORM} MODE - quoting the syntax from (flaky, not-recently-exercised) memory.) However, it would be more normal to write the whole thing in I4GL. -- Jonathan Leffler <jonathan.leffler@gmail.com> #include <disclaimer.h> Guardian of DBD::Informix - v2011.0612 - http://dbi.perl.org "Blessed are we who can laugh at ourselves, for we shall never cease to be amused." --00151773ea0a5dfe1404b2935f10