Re: 4GL v4.10 CONSTRUCT question
Posted in 1994
A few days ago, I said: > On page S-89 of the Informix-4GL Supplement (for version 4.10), it states > that in an ON KEY clause of a CONSTRUCT statement that you can override > the default and change the input buffer value for the current field. and went on to say that I didn't seem to be able to do this is my application. Thanks to a reply I received, I whipped up a tiny program where I was able to set the input buffer value. However my original program did not yield to this technique. It appears the critical difference is that in my ON KEY clause I call a function that opens a window and does an INPUT. When I take the INPUT out, everything works fine, but when it's in the program it breaks. I am not sure whether this is a bug or is a documented feature (same thing aren't they? :-) ). I include a cut-down version of the program below that exhibits the problem. Hit F3 at field1, type an arbitrary character string at F3, press return and you should see the string displayed in field1. For me the field is blank. Does it work for anyone? I am using 4GL/RDS version 4.10.UD1 on SunOS 4.1.3. Thanks, -- Shane Booth: shaneb@mentat.mel.cocam.oz.au Co-Cam Computer Group, Abbotsford, Vic., Australia :::::::::::::: test.4gl :::::::::::::: MAIN DEFINE field1 CHAR(5), test_qry CHAR(60) OPEN FORM test1_form FROM "test1" DISPLAY FORM test1_form CONSTRUCT BY NAME test_qry ON field1 ON KEY (F3) CALL test2() RETURNING field1 DISPLAY BY NAME field1 END CONSTRUCT DISPLAY test_qry CLOSE FORM test1_form END MAIN FUNCTION test2() DEFINE field3 CHAR(5) OPEN WINDOW test2_window AT 1,1 WITH 24 ROWS, 79 COLUMNS OPEN FORM test2_form FROM "test2" DISPLAY FORM test2_form INPUT BY NAME field3 CLOSE FORM test2_form CLOSE WINDOW test2_window RETURN field3 END FUNCTION :::::::::::::: test1.per :::::::::::::: database formonly screen { Field1: [f000 ] } end attributes f000 = formonly.field1 type char; end :::::::::::::: test2.per :::::::::::::: database formonly screen { Field3: [f000 ] } end attributes f000 = formonly.field3 type char; end