Page 1 of 1

Mixed language error validation messages of integer and real controls

Posted: 1 Apr 2016 7:09
by Ferenc Nagy
Mixed language error validation messages of integer and real controls
In my thread on the Visual Prolog branch http://discuss.visual-prolog.com/viewtopic.php?t=15509 I asked about the creation native language messages issued by the validation of integer controls.

I have attached the result of the disscussion to this post.

Usage: Insert into the form creation the russian::setRussianIntegerMessages() predicae call.

Code: Select all

clauses     new(Parent) :-         formWindow::new(Parent),         russian::setRussianIntegerMessages(),         generatedInitialize().
Hints:
The original message format in the integerControl.cl pfc-file contradict with the validation rules in the integerControl.pro file. The correct message should be "...greater than or equal...", "... less than equal ...", respectively.

Code: Select all

errorMessage_illegalValueMinimum = "% must be greater than %".     errorMessage_illegalValueMaximum = "% must be less than %".    checkMinMax(_Value) = string(string::format(errMsg_illegalValueMinimum_fact, getLabel(), minimum_fact)) :-         maximum_fact = default_maximum,         !.       checkMinMax(_Value) = string(string::format(errMsg_illegalValueMaximum_fact, getLabel(), maximum_fact)) :-         minimum_fact = default_minimum,         !.