Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Clear Windows vs ThisForm.Unload vs ThisForm.Release
Message
From
12/05/1999 14:06:37
Cheryl Qualset
Qualset Computer Consulting
Davis, California, United States
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00217522
Message ID:
00217965
Views:
17
I remember that cannot access selected table error!
I believe it was related to a dangling object reference. (It has been a while since this was fixed.) A dangling object has to do with a variable that points to an object. The object cannot be destroyed as long as there is any variable pointing to it. Sorry for the poor definition. I'm sure David can do better. The cure is to make sure all variable, including object properties, are set to NULL before destroying things.

HTH
Cheryl

>Ian,
>
>If you really want to close one form and start another, just call thisform.Release() to close the current form.
>
>>In my current app, all forms are permanently maximized inside the VFP main screen. With the exception of popup screens, there should only be one form active at a time. As users move from screen to screen (via buttons) I used to have the following code.
>>
>>> CLOSE DATABASES blah blah blach
>>> CLEAR WINDOWS
>>> DO FORM blah.scx
>>
>>I was in contact with MS Tech support regarding an unrelated issue and sent them my code. They suggested I not CLEAR WINDOWS but instead use THISFORM.UNLOAD.
>>
>>I changed my code over and now I have an intermittant error (which may be unrelated): CAN NOT ACCESS THE SELECTED TABLE pops up 7 times on my main form... sometimes. In fact the main form does not have even one table or database open. I can not detect the pattern that causes the error. What is realy odd is that my error routine is not catching the error. I have checked the KB and found a number of bugs and probs which can cause this prob (other than the obvious one of having an inaccessable table) but none of the items applied to my code.
>>
>>Anyway... I think it may be related to this THISFORM.UNLOAD change. I have read the MSDN help on the three code but I am still unclear on the differences. So my questions are:
>> 1: Any other ideas on the the CAN NOT ACCESS prob, and/or;
>> 2: What do you code do you use when a form is closed and why.
>>
>>Thanx in advance.
Previous
Reply
Map
View

Click here to load this message in the networking platform