Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to avoid valid if user select cancel button?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00206159
Message ID:
00206659
Vues:
17
>>>Nigel,
>>>
>>>Why are you not allowed to use the cancel property for the purpose for which is was put there?
>>
>>It's a user issue. They are not allowed to use escape or enter for default. Politics!
>
>Nigel,
>
>let me see if I understand the reasoning here. If the user presses escape to get out of a fomr because that is how all other applications work, your forms don't let the escape fire the cancel button. Then the user presses escape and nothing happens. So, the user beign an intelligent person tries their mext method of getting out Ctlr-Alt-Del or the power switch and that works fine.
>
>I'm sorry, but this UI standard doesn't make any sense. Anyway, you can't suspend the valid execution unless you know that the user hit the button. The button doesn't get hit until after the valid fires. There is no way to know if the user hit the button EXCEPT to use the Cancel property so the button sets lastkey() to 27 so you can check for it in the valid. Perhaps this will be a impetus to change the standard.

It does make sense if the operators are used to pressing enter after each field on a data entry screen. If you then default the 'Save' button the app will try to save after they only key one field. The issue with the escape button is to ensure that they don't accidentally press escape and lose all their data. It all depends on the history of what you're trying to do.

As for your answer that the button doesn't get hit until after the valid fires: that is what I thought the answer would be. Thanks.
Nigel B Coates
NBC Software Services
Dublin, Ireland.
eMail: Nigel.Coates@NBCSoftware.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform