LMD-Tools Validators Guide


New Error Messaging Control


How to create a new error messaging control? Often a convenient and useful way of validation feedback is to display an error message in some control e.g. label, list box (which can serve as validation log), status bar etc. This way of error indication is supported by TLMDControlErrorProvider which references such a control with its ErrMsgControl property. The error messaging control has to support ILMDValidatingMsgControl interface defined in LMDVldBase unit.

 

ILMDValidatedControl interface methods

 

Name

Parameters

Result type

Description

SetErrorMessage

val : string;

errorLevel: integer

none

If errorLevel is non-zero should display (or append) the error message val; otherwise should clear the error message

GetLastErrorMessage

none

string

should return the most recent (currently visible) error message

 

See LMD Demo VCL Validated Controls for examples of implementing error  messaging controls.