Information générale
Catégorie:
Gestionnaire d'écran & Écrans
This doesn't make sense. If the last key the user pressed was the escape key, then the form will be closed and it doesn't matter to the form what the user does after that.
Michelle
>I think there is a big problem with this solution (that is, checking the lastkey()) !!!
>If the last key the user pressed was the escape key and since then, he didn't use the keyboard anymore (only his mouse) and then he tries to quit the field with the valid routine suggested above USING HIS MOUSE, the lastkey still returns 27 though he didn't quit the fields using escapekey, so the validation won't execute though it should !!!!!
>
>BTW : A similar problem exists with the validroutine in gridfields ... (one can quit a field in a grid using the mouse, bypassing it's validmethod, leaving the gridfield with an unchecked value)
>
>My suggestion :
>let the valid routine accept an empty value or a correct value ; when the OK/SAVE/WHATEVER button is pressed check if there are any fields that are empty but shouldn't and refuse the OK/SAVE/... if there are empty fields that shouldn't.
>Disadvantage : the user has to clear the field first if he wants to cancel ...
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement