Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Locfile()
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00119369
Message ID:
00119660
Vues:
19
>>>The Locfile() command returns a VFP error if you click CANCEL, instead of a null string or other "This didn't work" value. I *can* use Getfile(), although I would prefer Locfile() for a specific use. Any suggestions other than disabling our standard error handler before the call, trapping for this error and then re-enabling the error handler?


I am not sure this would work since I don't know how your error handleing works, but I assume you are using on error global error handler.

Well, in VFP each object has a method, when an object creates an error VFP goes up the container hierarchy and if it finds no code in any error methods it will use the on error setting.

So, perhaps on the form, or in the object you use LocFile() you could handle that specific error. If the error is not the one that mean LocFile Canceled() you can call your error handler explicitly.

(In 6.0 you could cause the error again with the ERROR keyword)

BOb
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform