Re: R4GL INPUT statement. Field input lost?
Posted in 1995
Nils.Myklebust@ccmail.telemax.no wrote: >> jsturm@zenacomp.zenacomp.com (Jeff Sturm) writes: >> david roper (daver@adam.com.au) wrote: >> : I am using r4gl 6.02.UC1 but have always had this problem with earlier >> : versions. >> >> : In an input statement, I use "ON KEY F3 ... EXIT INPUT". > >Remember you also loose this data if you do a next field inside the on key >clause (at least in some versions). >All this is a design flaw in Informix 4GL. This shouldn't ever have happened. >Wysiwyg should clearly have been the rule here. The problems that gives could >have been solved easier than the problems we now have. > >> : The problem is >> : if the user has typed something into the current field and then presses >> : the F3 key, the information they have just typed in not stored in the >> : field. Is there a way to make this Information saved to the field without >> : having to use a long set of "IF INFIELD()" statements? >> >> Would the get_fldbuf() function help with this? Maybe something like: >> >> on key f3 >> let field_val = get_fldbuf(field_name) >> ... >> >> I haven't tried this however. >We do this as follows: > call get_fldbuf(field1, field2...) returning p_field1, p_field2... >where field1.. are the screen field names and p_field1... are the corresponding >program variables. We put all fields of the input statement into this ...... What we really need here is for 4gl to be able to recognize multiple keys as accept keys, each key having a different purpose in the application. I need, for example, the f2 and f6 keys to "accept" form fields. Which key was pressed can then be determined in the after input clause. -- John H. Frantz (http://www.strengur.is/~frantz/pow4gl.html)