Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sorry to be such a Dullard!
Message
From
26/07/2010 10:06:09
 
 
To
26/07/2010 09:20:43
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
01473802
Message ID:
01473896
Views:
47
>>What variable, value or condition do I check to check the existence of "ThisForm.OtherForm"? I want to make sure the new form is closed before it is called again, because the form creates a cursor to populate the data, and the initial cursor would be destroyed thus causing a problem when returning to the first open instance. Is there a conditional statement to test before issuing ThisForm.OtherForm.Release() ?
>
>You might also check if type("ThisForm.OtherForm") = "O". After instantiating the form, the type of the reference will be "O" (Object), but after destroying the form, it will be of type "U" (unknown).
>
>On the other hand, cursors in one form should not interfere with cursors in another form. Each form, and especially each data-handling form, should use a private datasession (Form.DataSession = 2 - private).
>
>In this case, I would still recommend only one child form per parent form, but only for organizational purposes.
>
>>This could also be applied when closing the first form as well (if I follow your discussion with Naomi).
>
>If you do have any problem (I am not quite sure of this), you could also set the property reference to NULL: ThisForm.OtherForm = NULL. If the form was created with the LINKED keyword, that should automatically close the other form.

Thanks for all the help.

dg
Previous
Reply
Map
View

Click here to load this message in the networking platform