Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Exit
Message
De
17/07/2001 09:30:11
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
17/07/2001 09:27:06
Chuck Tripi
University of Wisconsin - Milwaukee
Milwaukee, Wisconsin, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de menu & Menus
Titre:
Re: Exit
Divers
Thread ID:
00530998
Message ID:
00531488
Vues:
10
>>>>>VFP 6.0
>
ON SHUTDOWN QUIT
>
>>You need to be careful with a command like that... if you have anything open, and you don't do some cleanup, you might have problems.
>>
>>You may want to consider calling a cleanup routine instead.
>
>I see... I kinda know what you mean. However, I have one command in my File > Exit, QUIT. I open ALL 4 tables in the beginning of the application and it all remains open until the QUIT is fired. So far, all seems well? Are you saying I should CLOSE ALL, then QUIT (two command lines)?
>
>Chuck

I suggest:
ON SHUTDOWN MyShutDown()
In the menu, invoke MyShutDown().

In the corresponding toolbar, invoke MyShutDown().

MyShutDown() may include
CLOSE ALL
QUIT && CANCEL is better, for the sake of the programmer
Thus, you have one central place to manage your clean-up (in case you later find that you need to add additional commands).

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform