Share Tips, Code Samples, etc. with the Visual Prolog community.
User avatar
Ferenc Nagy
VIP Member
Posts: 215
Joined: 24 Apr 2007 12:26

Mixed language error validation messages of integer and real controls

Unread post 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,         !.    
Attachments
Russian.cl
Class header
(777 Bytes) Downloaded 2039 times
Russian.pro
Clauses
(1.73 KiB) Downloaded 2024 times
TIA, Regards,
Frank Nagy
Post Reply