Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error event
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP
Database:
MS SQL Server
Divers
Thread ID:
01002297
Message ID:
01002682
Vues:
20
>If you don't have a code in Error event of the control and error occurs during the execution of some part of your code the form error event is called. If you don't have a code in error event of the form then Error handling routine seted by ON ERROR is called. If you don't have ON ERROR ... The default VFP error handler is fired.

Borislav,

I believe you are mistaken: if an error occurs in code for a control that has no Error method code, it does not automatically escalate to the form's Error event. That would have been a better design choice for VFP (IMO), but it doesn't work that way. One way around this problem is to avoid putting any code likely to encounter errors in a method of the form, and let the control invoke this form method, instead of doing it inline. Another solution would be to add some logic to the global ON ERROR handler to check for _screen.activeform. There are still more options, of course.

Mike
Montage

"Free at last..."
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform