Move creation of SQLhelp from application startup to a place where it's done on demand.

Move public property keyword to the private context as it is no longer accessed from outside.
This commit is contained in:
Ansgar Becker
2007-07-03 20:22:49 +00:00
parent c02ae7a711
commit 79c95bd9fd
5 changed files with 20 additions and 9 deletions

View File

@ -40,9 +40,9 @@ type
private
{ Private declarations }
m : TMDIChild;
Keyword: String;
public
{ Public declarations }
Keyword: String;
end;
const
@ -51,8 +51,7 @@ type
ICONINDEX_CATEGORY_OPENED : Integer = 97;
ICONINDEX_HELPITEM : Integer = 98;
var
frmSQLhelp : TfrmSQLhelp;
function SQLhelpWindow(AOwner: TComponent; Keyword: String = ''): Boolean;
implementation
@ -64,6 +63,22 @@ uses ZDataset, helpers, main, db;
{**
Create form on demand
@param TComponent Owner of form (should be calling form)
@return Boolean Form closed using modalresult mrOK
}
function SQLhelpWindow(AOwner: TComponent; Keyword: String = ''): Boolean;
var
f : TfrmSQLhelp;
begin
f := TfrmSQLhelp.Create(AOwner);
f.Keyword := Keyword;
Result := (f.ShowModal=mrOK);
FreeAndNil(f);
end;
{***
Startup
}