Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error using ON KEY LABEL in a From
Message
 
À
14/03/2008 11:12:36
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
01301881
Message ID:
01302145
Vues:
12
>Why?

Jay,

Here's one reason. ON KEY LABEL is an intercommand interrupt, that is it will iterrupt running code in between commands being executed. The KeyPress event is an event that only gets processed when VFP is in a wait state waiting for user input. Therefore if you need something that will interrupt running code and jump in then OKL is the only thing that will do that for you, however if you are intending to process user input during the normal user input processing then KeyPress is the feature of the language that does that and it is the most appropriate way to accomplish your goal.

It is sort of similar as to why we create LOCAL vars unless there is a specific reason that the var has to scoped more broad than LOCAL. OKLs can be dangerous if they interrupt the wrong code at the wrong time.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform