|
I am teaching a class in VARPG and one of the students brought a problem to my attention. I was able to readily duplicate it. I get a VARPG generated validation message that I can't get out of without killing the program. I'm not sure if the technique I am using is right. Here's the steps to recreate this and i'll attach the ODF, TXM file and VPG code for the errant program in case anyone wan'ts to try it. 1. create a window with two entry fields and a radio button 2. open properties for field1, a character (30A) field and add a validation message if it's NE blank (' ') and attach *MSG0002. 3. open properties for field2, a numeric field (9,0) and add "range" validation for between 1000 and 59999 and attach *MSG0001. 4. code and action subroutine on the numeric field so that when it looses focus, check if the numeric field is under 50000 and if so, check the radio button. 5. code an exit button for eval *INLR = *ON. The problems are: 1. When compiled, if you enter 1 in the numeric field and click somewhere else to make focus be lost, a system supplied validation message appears that isn't the *MSG0001 that I coded. Further, it won't go away and sometimes is duplicated so that there are two error messages. Maybe there's a conflict between the concept of lost focus and the error message display? Could that be? 2. Not sure why, but it also appears that the character validation field NEVER gets checked. I thought as soon as you "left" the field, the validation "fired". Am I wrong about that? This program is one of the examples in the IBM supplied Partners in Education curriculum and so potentially a lot of people might try to do it. FYI, I'm on V4R4 of OS/400 and V3r2m2 of VARPG/CODE and SP002. Any thoughts on this would be appreciated. My students think they've found a bug in VARPG but I wonder if the usage of LOSTFOCUS and validation is a problem. Thanks to all. ---------------------------------------------------------------------- Rick Flagler Manager, Information Systems Timken Super Precision (MPB) Keene, NH 03431-0547 p: (603) 352-0310 x207 f: (603) 355-4534
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.