lcl: check helpmanager and comment how to init help system

git-svn-id: trunk@37990 -
This commit is contained in:
mattias 2012-07-21 20:22:38 +00:00
parent 6e6558677d
commit 3040b07cc2

View File

@ -232,6 +232,7 @@ type
var
HelpManager: THelpManager = nil;// set by the IDE
// LCL applications can call CreateLCLHelpSystem in unit LazHelpIntf
//==============================================================================
{ Showing help (how it works):
@ -348,6 +349,10 @@ end;
function ShowHelpForKeyword(HelpDatabaseID: THelpDatabaseID;
const HelpKeyword: string; var ErrMsg: string): TShowHelpResult;
begin
if HelpManager=nil then begin
ErrMsg:='HelpManager=nil';
exit(shrHelpNotFound);
end;
Result:=HelpManager.ShowHelpForQuery(
THelpQueryKeyword.Create(HelpDatabaseID,HelpKeyword),
true,ErrMsg);