Class TfrmErrorsAndWarnings

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TfrmErrorsAndWarnings = class(TfrmCustomGoPhast)

Description

TfrmErrorsAndWarnings is used to display error and warning messages that are generated during export of a model.

Hierarchy

Overview

Fields

Implicit pnlBottom: TPanel;
Implicit btnClose: TBitBtn;
Implicit vstWarningsAndErrors: TVirtualStringTree;
Implicit btnHelp: TBitBtn;
Implicit Timer1: TTimer;
Implicit btnSave: TButton;
Implicit sdSaveFileDlg: TSaveDialog;
Implicit btnClear: TButton;
Implicit btnCopy: TButton;
Private FErrorChildNodes: TList;
Private FErrorNode: PVirtualNode;
Private FErrorModels: TStringList;
Private FErrorModelMessageList: TModelMessageList;
Private FWarningChildNodes: TList;
Private FWarningNode: PVirtualNode;
Private FWarningModels: TStringList;
Private FWarningModelMessageList: TModelMessageList;

Methods

Implicit procedure FormCreate(Sender: TObject); override;
Implicit procedure FormDestroy(Sender: TObject); override;
Implicit procedure vstWarningsAndErrorsGetText(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType; var CellText: String);
Implicit procedure vstWarningsAndErrorsInitNode(Sender: TBaseVirtualTree; ParentNode, Node: PVirtualNode; var InitialStates: TVirtualNodeInitStates);
Implicit procedure vstWarningsAndErrorsMeasureItem(Sender: TBaseVirtualTree; TargetCanvas: TCanvas; Node: PVirtualNode; var NodeHeight: Integer);
Implicit procedure FormResize(Sender: TObject);
Implicit procedure Timer1Timer(Sender: TObject);
Implicit procedure btnSaveClick(Sender: TObject);
Implicit procedure btnClearClick(Sender: TObject);
Implicit procedure btnCopyClick(Sender: TObject);
Private procedure AddErrorOrWarning(Model: TBaseModel; RootList: TStringList; const TypeOfErrorOrWarning, ErrorOrWarning: string; var RootNode: PVirtualNode; Children: TList; ModelMessageList: TModelMessageList);
Private procedure RemoveWarningOrErrorGroup(Model: TBaseModel; const TypeOfErrorOrWarning: string; RootList: TStringList; Children: TList; ModelMessageList: TModelMessageList);
Private procedure CheckDeleteRootNode(Model: TBaseModel; var Node: PVirtualNode; RootList: TStringList; ModelMessageList: TModelMessageList);
Private procedure GetErrorsAndWarnings(ErrorsAndWarings: TStringList);
Private procedure InitializeRootNode(var Node: PVirtualNode; List: TStringList);
Public function HasMessages: boolean;
Public Procedure AddError(Model: TBaseModel; const Root, Error: string);
Public Procedure AddWarning(Model: TBaseModel; const Root, Warning: string);
Public Procedure Clear;
Public procedure RemoveWarningGroup(Model: TBaseModel; const TypeOfWarning: string);
Public procedure RemoveErrorGroup(Model: TBaseModel; const TypeOfError: string);
Public procedure ShowAfterDelay;

Description

Fields

Implicit pnlBottom: TPanel;

pnlBottom is the TPanel at the bottom of the TForm.

Implicit btnClose: TBitBtn;

btnClose closes the TfrmErrorsAndWarnings.

Implicit vstWarningsAndErrors: TVirtualStringTree;

vstWarningsAndErrors is used to display the error and warning messages in a tree view.

Implicit btnHelp: TBitBtn;

btnHelp is the Help button.

Implicit Timer1: TTimer;
 
Implicit btnSave: TButton;
 
Implicit sdSaveFileDlg: TSaveDialog;
 
Implicit btnClear: TButton;
 
Implicit btnCopy: TButton;
 
Private FErrorChildNodes: TList;

FErrorChildNodes is a list of the PVirtualNodes beneath FErrorNode.

Private FErrorNode: PVirtualNode;

FErrorNode is the node in vstWarningsAndErrors that has beneath it all the error messages. FErrorModels is associated with FErrorNode through the data record associated with FErrorNode.

Private FErrorModels: TStringList;

FErrorModels is a list of the error messages generated during export of a project. Its Objects property contains lists of the locations to which the error messages apply.

Private FErrorModelMessageList: TModelMessageList;
 
Private FWarningChildNodes: TList;

FWarningChildNodes is a list of the PVirtualNodes beneath FWarningNode.

Private FWarningNode: PVirtualNode;

FWarningNode is the node in vstWarningsAndErrors that has beneath it all the warning messages. FWarningModels is associated with FWarningNode through the data record associated with FWarningNode.

Private FWarningModels: TStringList;

FWarningModels is a list of the warning messages generated during export of a project. Its Objects property contains lists of the cells to which the warning messages apply.

Private FWarningModelMessageList: TModelMessageList;
 

Methods

Implicit procedure FormCreate(Sender: TObject); override;

FormCreate creates the lists that hold the errors and warnings. It also initializes the size of the record associated with nodes in vstWarningsAndErrors.

Implicit procedure FormDestroy(Sender: TObject); override;

FormDestroy destroys the lists that hold the errors and warnings and other data associated with the TfrmErrorsAndWarnings..

Implicit procedure vstWarningsAndErrorsGetText(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType; var CellText: String);

vstWarningsAndErrorsGetText determines the text to display in each cell.

Implicit procedure vstWarningsAndErrorsInitNode(Sender: TBaseVirtualTree; ParentNode, Node: PVirtualNode; var InitialStates: TVirtualNodeInitStates);

vstWarningsAndErrorsInitNode initializes all the nodes so they can be multi-line.

Implicit procedure vstWarningsAndErrorsMeasureItem(Sender: TBaseVirtualTree; TargetCanvas: TCanvas; Node: PVirtualNode; var NodeHeight: Integer);

vstWarningsAndErrorsMeasureItem determines the height of the current node.

Implicit procedure FormResize(Sender: TObject);
 
Implicit procedure Timer1Timer(Sender: TObject);
 
Implicit procedure btnSaveClick(Sender: TObject);
 
Implicit procedure btnClearClick(Sender: TObject);
 
Implicit procedure btnCopyClick(Sender: TObject);
 
Private procedure AddErrorOrWarning(Model: TBaseModel; RootList: TStringList; const TypeOfErrorOrWarning, ErrorOrWarning: string; var RootNode: PVirtualNode; Children: TList; ModelMessageList: TModelMessageList);

AddErrorOrWarning is used to add an error or warning to TfrmErrorsAndWarnings. It first creates RootNode if it does not exist and associates RootList with it. Then if checks if an error message like TypeOfErrorOrWarning has been created. If not, it creates a PVirtualNode for it (stored in Children) and associates a TStringList with it. The TStringList is also stored in RootList in its Objects property. Finally, ErrorOrWarning is added to the TStringList and a new PVirtualNode is created.

Private procedure RemoveWarningOrErrorGroup(Model: TBaseModel; const TypeOfErrorOrWarning: string; RootList: TStringList; Children: TList; ModelMessageList: TModelMessageList);
 
Private procedure CheckDeleteRootNode(Model: TBaseModel; var Node: PVirtualNode; RootList: TStringList; ModelMessageList: TModelMessageList);
 
Private procedure GetErrorsAndWarnings(ErrorsAndWarings: TStringList);
 
Private procedure InitializeRootNode(var Node: PVirtualNode; List: TStringList);

InitializeRootNode creates a new root node (PVirtualNode) and associates List with it.

See also
FErrorNode
FErrorNode is the node in vstWarningsAndErrors that has beneath it all the error messages.
FWarningNode
FWarningNode is the node in vstWarningsAndErrors that has beneath it all the warning messages.
Public function HasMessages: boolean;

Private declarations

Public Procedure AddError(Model: TBaseModel; const Root, Error: string);

AddError is used to add a new error message to TfrmErrorsAndWarnings. Root is the type of error, Error is the specific cell to which the error applies.

Public Procedure AddWarning(Model: TBaseModel; const Root, Warning: string);

AddWarning is used to add a new warning message to TfrmErrorsAndWarnings. Root is the type of warning, Warning is the specific cell to which the warning applies.

Public Procedure Clear;

Clear deletes the warning and error messages and clears vstWarningsAndErrors.

Public procedure RemoveWarningGroup(Model: TBaseModel; const TypeOfWarning: string);
 
Public procedure RemoveErrorGroup(Model: TBaseModel; const TypeOfError: string);
 
Public procedure ShowAfterDelay;
 

Generated by PasDoc 0.12.1 on 2013-05-13 15:41:35