Re: [?]Fourgen;header/detail;display array difficulties
Posted in 1995
cpilot (cpilot@teleport.com) wrote: : Greeting Net.Wisdom: : I am currently struggling to make fourgen detail display array to : function properly--in terms of what I desire it to do. What I desire it : to do is this: [stuff deleted] : enforce entry of data in one particular field ie. can not insert a : new line until the current one has a value in this field. I : have implemented this by making the column of the detail table : not null. This seems to work just fine. : Ok, now for what does not work fine. I am required to not : require a value in the afore-mentioned field if the user decides : he is done entering data and presses escape. : : What happens currently is that I press escape and I get an error : telling me I need to enter data into this particular field--even : after I have hit F2 to delete this row. I still cannot leave this : row until I enter a value in that field. I AM able to hit TAB and : switch up to the header, that works fine, but unfortunately this : solution is met with the 'do better' look. : Help? I fell into the same trap a time before. When I used not null constraint, my application behaved the same way. Finally I solved this problem this way: 1. do not use not null constraint 2. after block data_changed: - if was pressed key to leave current row and current row is not empty, check the field - there you can do any kind of checking (it allows to return to the right field to correct entered value) I wrote library function to detect keys, which leave the row. It allows me to return up from the last empty row or press accept key. : Much thanks to any pointers! Email me, if you want more info. -- Zdeno Miklas SOFTEC spol. s r. o. e-mail: ash@softec.sk Kutuzovova 23 phone : 42-7-273805 ext.128 831 03 Bratislava fax : 42-7-272537 SLOVAKIA