diff --git a/applications/lazstats/LazStats.chm b/applications/lazstats/LazStats.chm index 79df4c823..1c3c7a5ab 100644 Binary files a/applications/lazstats/LazStats.chm and b/applications/lazstats/LazStats.chm differ diff --git a/applications/lazstats/docs/HelpNDoc/LazStats.hnd b/applications/lazstats/docs/HelpNDoc/LazStats.hnd index d67b61614..029f689ac 100644 Binary files a/applications/lazstats/docs/HelpNDoc/LazStats.hnd and b/applications/lazstats/docs/HelpNDoc/LazStats.hnd differ diff --git a/applications/lazstats/source/forms/analysis/descriptive/xvsmultyunit.lfm b/applications/lazstats/source/forms/analysis/descriptive/xvsmultyunit.lfm index 37170774f..79fefe996 100644 --- a/applications/lazstats/source/forms/analysis/descriptive/xvsmultyunit.lfm +++ b/applications/lazstats/source/forms/analysis/descriptive/xvsmultyunit.lfm @@ -31,6 +31,8 @@ inherited XvsMultYForm: TXvsMultYForm inherited HelpBtn: TButton Left = 36 Top = 459 + HelpType = htKeyword + HelpKeyword = 'html/PlotXVersusMultipleYValues.htm' end inherited ButtonBevel: TBevel Top = 443 diff --git a/applications/lazstats/source/forms/analysis/descriptive/xvsmultyunit.pas b/applications/lazstats/source/forms/analysis/descriptive/xvsmultyunit.pas index c7ef9e486..265d5d27b 100644 --- a/applications/lazstats/source/forms/analysis/descriptive/xvsmultyunit.pas +++ b/applications/lazstats/source/forms/analysis/descriptive/xvsmultyunit.pas @@ -47,6 +47,7 @@ type procedure AdjustConstraints; override; procedure Compute; override; procedure UpdateBtnStates; override; + function Validate(out AMsg: String; out AControl: TWinControl): Boolean; override; public constructor Create(AOwner: TComponent); override; @@ -84,24 +85,7 @@ var ColLabels: StrDyneVec = nil; selected: IntDyneVec = nil; begin - if XEdit.Text = '' then - begin - ErrorMsg('No X variable selected.'); - exit; - end; - - if YBox.Items.Count = 0 then - begin - ErrorMsg('No Y variables selected.'); - exit; - end; - xCol := GetVariableIndex(OS3MainFrm.DataGrid, Trim(XEdit.Text)); - if xCol = -1 then - begin - ErrorMsg('X variable not found.'); - exit; - end; nY := YBox.Items.Count; NoSelected := nY + 1; // one more for the x column, needed by Correlations() @@ -220,6 +204,37 @@ begin end; +function TXvsMultYForm.Validate(out AMsg: String; out AControl: TWinControl): Boolean; +var + xCol: Integer; +begin + Result := false; + + if XEdit.Text = '' then + begin + AControl := XEdit; + AMsg := 'No X variable selected.'; + exit; + end; + + xCol := GetVariableIndex(OS3MainFrm.DataGrid, Trim(XEdit.Text)); + if xCol = -1 then + begin + AControl := XEdit; + AMsg := 'X variable not found.'; + exit; + end; + + if YBox.Items.Count = 0 then + begin + AControl := VarList; + AMsg := 'No Y variables selected.'; + exit; + end; + + Result := true; +end; + procedure TXvsMultYForm.VarListDblClick(Sender: TObject); var index: integer;