Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ON SHUTDOWN situation
Message
From
19/10/1997 01:01:43
 
 
To
18/10/1997 23:35:32
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00055289
Message ID:
00055332
Views:
28
>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform