Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sorry to be such a Dullard!
Message
From
25/07/2010 21:35:06
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
01473802
Message ID:
01473828
Views:
43
>>>>That was painless....(FOR ME!) thanks for the help!
>>>>
>>>>dg
>>>
>>>Great! The following general principles may also help you in other programming tasks:
>>>
>>>1. Variables declared in one method will not be available in another method of the same form. Form-level properties solve this problem. (Public variables are an abomination unto the Lord. - Well, they may be used on rare occasions, but this is not one of them.)
>>>
>>>2. These properties may also be objects.
>>>
>>>Note that sometimes you will get a dangling object reference. If you have trouble closing a form, it may be that somewhere else you still have a reference to your form.
>>
>>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() ?
>>
>>This could also be applied when closing the first form as well (if I follow your discussion with Naomi).
>>
>>Thanks,
>>
>>dg
>
>To check for existence:
>
>if type('thisform.OtherForm.Name') = 'C'
> * Form is alive
>endif


Thanks.

As would:

IF vartype(Thisform.OtherForm.Name) = 'O'
ThisForm.OtherForm.Name.Release()
ENDIF


Correct?

dg
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform