Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
_CUROBJ and valids
Message
De
11/04/1998 18:10:35
 
 
À
09/04/1998 18:21:30
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Divers
Thread ID:
00090899
Message ID:
00091352
Vues:
31
Joe,

Even though you change _CUROBJ variable in a valid, it does not change until you exit the valid. By setting it you are kind of asking to change objects, but the change doesn't happen till you exit this one. Meanwhile _CUROBJ tells you in which object you are _now_.

It is best to test for the error in the field valid. I always give the error message myself and return .T. and find it less complicated. If you have serveral fields it probably is good to test in the read valid as well. Naturally the read valid needs to return .F.


@ 3,29 GET staff.number ;
SIZE 1.000,13.167 ;
VALID valstaf() error errmess

READ valid valme()

PROCEDURE valstaf
IF ";" $ staff.number

WAIT WINDOW "Person's # may not contain semi-colon(;)"
_CUROBJ = OBJNUM(staff.number) && Or any other variable

* BY the way _CUROBJ = _CUROBJ forces it to stay, too, if you use it here

ENDIF

RETURN

Alex
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform