FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log inLog in 


Mixed language error validation messages of integer and real controls

Post new topic   Reply to topic    discuss.visual-prolog.com Forum Index -> Visual Prolog Tips & Samples
View previous topic :: View next topic  
Author Message
Ferenc Nagy



Hungary
Joined: 24 Apr 2007
Posts: 378

PostPosted: 1 Apr 2016 7:09    Post subject: Mixed language error validation messages of integer and real controls Reply with quote

Mixed language error validation messages of integer and real controls
In my thread on the Visual Prolog branch[url] http://discuss.visual-prolog.com/viewtopic.php?t=15509[/url] 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.


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.


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,
        !.




Russian.pro
 Description:
Clauses

Download
 Filename:  Russian.pro
 Filesize:  1.73 KB
 Downloaded:  119 Time(s)


Russian.cl
 Description:
Class header

Download
 Filename:  Russian.cl
 Filesize:  777 Bytes
 Downloaded:  116 Time(s)


_________________
TIA, Regards,
Frank Nagy
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    discuss.visual-prolog.com Forum Index -> Visual Prolog Tips & Samples All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum