Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ON SHUTDOWN situation
Message
De
19/10/1997 01:01:43
 
 
À
18/10/1997 23:35:32
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00055289
Message ID:
00055332
Vues:
33
>>when I have 2 depending forms I always instantiate the "son" as a property of the parent form
>>thus closing the parent form also closes the child form (as it goes out of scope)
>
>Any special recommendations in order to make sure the parent will be closed first? I am using something like this right now which is mostly to scan all the forms and taking action on them.

My application object has a DoForm method
which checks an Array to see if the form is already open (or how many copies of it are open etc.) and if not
instantiate the form and register it
upon shutdown the application object scan this array and send a terminate
msg to to the dispatch method of each form
then the form is responsible to cleanly close itself
forms which are instantiated by forms (as "sub-forms") are not normally under
the responsibility of the application object (it will "kill" any left-over forms at the end - if something went wrong etc.)
and it is app to the parent form to handle its subforms (ie send them a terminate msg etc.)

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

Click here to load this message in the networking platform