Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GetFldState and Alias not found troubles
Message
From
21/10/1997 17:45:49
 
 
To
21/10/1997 14:22:09
Bob Lucas
The WordWare Agency
Alberta, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00055703
Message ID:
00055876
Views:
66
>>>I am getting a migraine headache over this one. I am just starting a new app and testing with 3 forms. One is against a base table, the other 2 are against local views. They all use private data sessions and optimistic row locking. I have 2 major headaches:
>>>
>>>2. When testing with one of the forms against a local view, when I select the exit option from my main menu, I get an error in the goapp.cleaup() when it is releaing this form. The error says "lv_Region alias not found" but if I suspend, go to the command window, and type DISPLAY STATUS, lv_region is there!
>>>
>>>
>>>One thing you want to be careful of is having objects 'outside' of your form referencing the data environment. If your form uses a private datasession, whenever a method is called in the global application object, during this method call, the data session reverts to the datasession of the application object or generally the default datasession. I once tried adding global data handling functions to my application object. Did not work. It could never find the tables. Those methods are now in objects on the form. This could possibly be the 'by design' issue you are experiencing.
>>Hi Bob.
>>
>>The program is blowing up on the line _Screen.Activeform.Release(). I don't understand why it only happens on only this one form. I have another form using a different local view, and it shuts down just fine.
>>
>>Thanks.
>>
>>Marcia
>
>Okay, If I understand this right, your menu option to exit calls the goapp.cleanup() which wants to close any active forms so it does the _screen.activeform.release().
>
>The first thing I would suspect is some routine is being called twice, the first time it properly closes the view, the second time the view is not there! Do you get the same result if you do a normal close of the form (close button or right corner little x)?
>
>Have you traced through the methods that are called when the cleanup method is called? Sometimes this can be very illuminating! I had a problem where the valid method of a textbox was being called AFTER the form had been released. It almost worked fine until it had to reference properties that were now NULL. This only happened if confirm was set on (it made sense after I debugged it).
Hi Bob.

I've spent some time tracing thru the code. It seems to me that the view not only has to be open, but also has to be the currently selected work area for the form to release properly. Is this right? Because for this one particular form, at release, the view is not in the currently selected work area.

BTW, it doesn't happen if I close the form before exiting the app. It only happens when I do a Save after selecting exit from the menu.

Thanks for all the help.

Marcia.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform