THTMLBrowserHelpViewer.ShowNode function
Displays the help node for a HTML help topic.
Declaration
function ShowNode(Node: THelpNode; var ErrMsg: string): TShowHelpResult
; overrideDescription
ShowNode is an overridden
TShowHelpResult function used
to display the help node for a HTML help topic. The return value is one of
the values from the
TShowHelpResult enumeration.
Node contains the THelpNode displayed in the method.
ErrMsg is a variable parameter updated to describe an error condition occurring in the return value for the method, or an empty string when an error condition is not encountered.
When Node contains an invalid URL, the value in ErrMsg is set to 'THTMLBrowserHelpViewer.ShowNode Node.URLValid=false'. If Node has an empty URL, ErrMsg is set to the value 'THTMLBrowserHelpViewer.ShowNode Node.URL empty'. ErrMsg may contain a constant value for other specific error conditions, such as:
- hhsHelpNoHTMLBrowserFoundPleaseDefineOne
- hhsHelpNoHTMLBrowserFound
- hhsHelpBrowserNotFound
- hhsHelpBrowserNotExecutable
- hhsHelpErrorWhileExecuting
ShowNode uses the value in BrowserPath as the executable for the HTML help viewer. BrowserParams is used as the arguments passed to the executable. When BrowserPath is unassigned, the FindDefaultBrowser method is called to update the executable and parameters used in the help viewer. For the Windows platform, the executable may contain a quoted value; the quotes are removed before the FileExistsUf8 and FileIsExecutable methods are called to verify the executable file name.
ShowNode ensures that a '%s' macro marker in BrowserParams is updated with the URL for the help node in Node.
ShowNode creates a TProcessUTF8 instance that is used to execute the browser application with the required browser parameters. The process does not inherit standard handles for input, output or errors. The process is freed when execution has been completed.
The return value is set to shrSuccess when the HTML help topic has been successfully displayed in the help browser. An exception that occurs during execution of the browser process is handled in the method. ErrMsg is updated to reflect the exception message, and the return value is set shrViewerError.
ShowNode is used in the implementation of the ShowURL method.
See also
- BrowserPath
- BrowserParams
- ShowURL
- TShowHelpResult
- THelpViewer
- THelpNode
An experiment, built from Lazarus main 2dfa93c66e of 10-22-2026. Not the official Lazarus documentation.
