Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Clear Events - what really happens?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Clear Events - what really happens?
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00963078
Message ID:
00963078
Views:
44
I have an app that runs as a top-level form. So when the user exits the form, he's exiting the entire program. I discovered a situation where the program was not closing properly (though it appeared to). The help text regarding CLEAR EVENTS indicates that when that statement is executed, code execution picks up immediately after the READ EVENTS statement. Well, that doesn't actually seem to be the case, but it's not an issue in my "regular apps" - they shut down properly. With this app I experience a problem. Although I could skip a "Close" or "Exit" button and just make the user click the Close button at the upper right of the window's title bar, I did put an Exit button to just make things a little clearer. So the Exit button calls an exit procedure that does this:
release oForm  && Global reference to the form itself
clear events
thisform.release
This is actually a bit different than my previous code, which worked in most situations, but failed in a particular one. So now I've "improved" it by making it fail all the time. But the point is that I'm not getting the program to shutdown like it should. As I mentioned, it appears to shutdown, but the EXE is still in use. If I try to rename it, I can't until I issue a CLOSE ALL, CLEAR ALL. Tracing the shutdown code seems to result in behavior that is a bit different, making it harder to determine what's really going on.

Thanks,

Russell Campbell
eCost.com continues to rip people off
Check their rating at ResellerRatings.com
Next
Reply
Map
View

Click here to load this message in the networking platform