Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ON SHUTDOWN
Message
De
18/06/1997 21:56:21
Lawrence A. Jardine
Data Management Solutions
St. John's, Antilles
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00036589
Message ID:
00036905
Vues:
35
>>>>When I use 'ON SHUTDOWN DO CloseProg' (where 'CloseProg' is a procedure in the main
>>>>program) in an .EXE - VFP5.0, my error handler returns 'closeprog.prg cannot be found'. It
>>>>appears as though the ON SHUTDOWN command destroys the environment and memory
>>>>variables before executing the DO CloseProg. The problem does not exist in the interactive mode.
>>>>Why?
>>>
>>>Hi Lawrence,
>>>The easiest solution is:
>>>ON SHUTDOWN do MyProcedure IN MyProgram
>>
>>Hi Glenn,
>>I had tried that clause which did not solve the problem at the time. But I had subsequently
>>cleaned up some code. Your suggestion prompted me to re-test that exit path and it now works
>>even without the 'IN' clause.
>
>Your syntax should look like this:
>
>OH SHUTDOWN DO CloseProg()
>
>the parenthesis are required so that fox knows your talking about a function and
>not a seperate program. Why the behavior is different in the two modes is unknown to me! ;)

Thanks Steve, I will try the parenthesis - Lawrence
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform