Kbase 18651: Validate Method Does Not Apply
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  7/17/2003 |
|
Status: Unverified
FIX:
When using the Validate Method to check validation on a Frame or a Widget, it gives input focus to the first widget that fails validation. The cursor is placed in that widget, but it doesn't apply entry to that widget. This behavior is undocumented.
/*****************************************************/
DEFINE VARIABLE a AS CHARACTER NO-UNDO.
DEFINE VARIABLE b AS CHARACTER NO-UNDO.
DEFINE BUTTON btn LABEL "Validate Now".
DEFINE FRAME x a VALIDATE(a BEGINS "a","a must begin with a")
b VALIDATE(b BEGINS "b","b must begin with b")
btn.
ON CHOOSE OF btn DO:
IF NOT FRAME x:VALIDATE() THEN
APPLY "entry" TO FOCUS.
END.
ON ENTRY OF a, b IN FRAME x DO:
MESSAGE "ENTRY" SELF:LABEL VIEW-AS ALERT-BOX.
END.
ENABLE ALL WITH FRAME x NO-VALIDATE.
WAIT-FOR WINDOW-CLOSE OF CURRENT-WINDOW.
/*********************************************************/