![]() ![]() get F table values for Conf and Pred bands with error checkingĮ('ERROR: Please enter the F value from ' +Į('ERROR: F value invalid.') Į('ERROR: Please enter or correct the F value.') If not (TryStrToFloat(cbPILimits.Text, PIPercent)) then Exit If not (TryStrToFloat(cbCILimits.Text, CIPercent)) then Exit Į('ERROR: Please select the % level for the ' + (TryStrToFloat(lbleHillslopeMaxValue.Text, If not ((TryStrToFloat(lbleHillslopeMinValue.Text, (lbleHillslopeMaxValue.Text = '-0.')) then If ((lbleHillslopeMaxValue.Text = '-') or (lbleHillslopeMinValue.Text = '-0.')) thenĮ('ERROR: Maximum iteration range value ' + If ((lbleHillslopeMinValue.Text = '-') or max constraint cannot be zero or less than min constraintĮ('ERROR: Minimum iteration range value ' + If not ((TryStrToFloat(lbleConstraintsMin.Text, now for more error-checking for both constraints ![]() is max constraint value valid? - contd.Į('ERROR: Maximum constraint value ' + If ((lbleConstraintsMax.Enabled = True) andĮ('ERROR: Please enter value for maximum ' + is min constraint value valid? - contd.Į('ERROR: Minimum constraint value ' +Į('ERROR: Please enter or correct the ' + If ((lbleConstraintsMin.Enabled = True) andĮ('ERROR: Please enter value for minimum ' + If (rgConstraintMinMax.ItemIndex = 1) then //if No chosen error checking if user chooses to enter constraint values If (rgConstraintMinMax.ItemIndex = 0) then //if Yes chosen 'and maximum input response variables? ' + If (rgConstraintMinMax.ItemIndex = -1) then //if no radiobutton checkedĮ('ERROR: Do you want to constrain the minimum ' + Populate memo with error messages if user makes mistakes procedure TfrmAnalysisOptions.btnSaveOptionsClick(Sender: TObject) Ĭonst AllowedPlus = Sorry about posting the code for the entire procedure, but I wonder why try except end does not allow the form to close. The following code works exactly as i want it to. The following code works with try finally end but not with try except end, meaning that with the except, it seems to skip the except block and does not close the form even if there are no error messages and the Memo is clear. If there aren't any error messages, then I want the form to be able to close upon pressing the Save button. I want the Memo to become visible and display the error messages (if there are any) when a Save button is pressed. So if there are no error messages, there are no entries in the Memo. I am adding error messages to a Memo when the user makes incorrect entries on a form. ![]()
0 Comments
Leave a Reply. |