Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Valid & Error events
Message
De
05/06/1998 19:21:16
Nancy Folsom
Pixel Dust Industries
Washington, États-Unis
 
 
À
05/06/1998 17:57:15
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00105397
Message ID:
00105411
Vues:
30
Hi, Rafael.

>...and there is no way as far as I've seen to keep the cursor in the same field, not even with an error routine that calls the objet's SetFocus event to force this.

Is your validation code in the control's Valid Event? When the Valid returns .F. (or, 0), the control won't (shouldn't) lose focus.



>SEEK(this.value) && Your valid event generates an Error, ...

Do you mean program error? Or user error? If you have a program error in the valid, then you've got to fix the code or recover from the error some other way than trying to go back to the control...which doesn't really make sense anyway.


>Now in VFP the lines are executed and return values per line so this is not

I don't understand at all what you mean by this? The valid method won't return a value "per line"--only when it hits a RETURN or the end of the method...

>...if your table's index is set as Primary, you get an error from the first
Right. There are a few different ways of handling primary keys.

1. Use surrogate keys that user doesn't enter, but that the system generates.
2. ...are there really any other solutions? *g*

Actually, when I need to set a candiate key on a user entered field, I trap the dupliate key error and do a transaction ROLLBACK and TABLEREVERT() to recover. (I use optimistic buffering).

HTH
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform