RDS 6.01.UD3
Posted in 1995
Dear All, We have come across an intersting problem using the field_touched() function in RDS 6.01.UD3 with 7.11.UC1 running on Solaris 2.4. The problem is that when in an input array if you go to another input screen (such as a pop up window) then when you return back to your input array line the field_touched function will return true for all fields. Even though they have not been touched. I have a test program that can be compiled and run. Below is the 4gl and the 2 .per files required for this. I have compiled and run this on both RDS 6.01.UD3 and RDS 4.11.UC2. The problem only occurs with version 6.01. Also you will notice when you run this that under 4.1 the smallint field in the input array is initialised to 0 whereas for version 6.01 it is left as null. Anyone come across this? Any ideas? If anyone gets a chance I would like to know if you get the same results on your platform or if this is a Solaris only bug. BTW, interested to know another difference between 4.11 and 6.01 RDS? Well on 4.11 constructs return a string of the form table.field="value" but 6.01 returns table.field='value'. It uses ' marks instead of " marks. Only causes a problem if you have code that tries to parse the where clause returned from the construct. Which we do obviously. TIA Jason Harris (RSWA) -- start doit.4gl main define p_doit array[3] of record stockid char(7), stockdesc char(20), qty smallint end record options accept key f1 open form p_doit from "doit" display form p_doit input array p_doit without defaults from s_doit.* before field stockid if field_touched(stockid) then display "before : stockid = on " at 12,7 else display "before : stockid = off" at 12,7 end if before field stockdesc if field_touched(stockdesc) then display "before : stockdesc = on " at 13,7 else display "before : stockdesc = off" at 13,7 end if before field qty if field_touched(qty) then display "before : qty = on " at 14,7 else display "before : qty = off" at 14,7 end if after field stockid if field_touched(stockid) then display "after : stockid = on " at 16,7 else display "after : stockid = off" at 16,7 end if after field stockdesc if field_touched(stockdesc) then display "after : stockdesc = on " at 17,7 else display "after : stockdesc = off" at 17,7 end if after field qty if field_touched(qty) then display "after : qty = on " at 18,7 else display "after : qty = off" at 18,7 end if on key (f10) call pop_it_up() continue input end input end main function pop_it_up() define onechar char(1) open window w_1 at 10,10 with form "doit2" attribute(border) input by name onechar close window w_1 end function -- end doit.4gl code -- start doit.per database formonly screen { Type something in this field below:- stockid stock_desc qty Line #1: [a001 ] [a002 ] [a03] Line #2: [a001 ] [a002 ] [a03] Line #3: [a001 ] [a002 ] [a03] Press : F10 = test pop_it_up() } end attributes a001 = formonly.stockid type char, upshift, reverse; a002 = formonly.stockdesc type char, upshift, reverse; a03 = formonly.qty type smallint, reverse; end instructions screen record s_doit[3] (stockid, stockdesc, qty); end -- end doit.per -- start doit2.per database formonly screen { Type a single char:- [a] } end attributes a = formonly.onechar type char, upshift, reverse; end -- end doit2.per