Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Quit Ignored
Message
From
26/01/2012 18:34:10
June Kendrick
Kendrick Associates, Inc.
New York, United States
 
 
To
26/01/2012 10:17:36
June Kendrick
Kendrick Associates, Inc.
New York, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 7
Miscellaneous
Thread ID:
01533811
Message ID:
01533890
Views:
73
>What are some of the reasons that the Quit command would be ignored?
>
>I have a form where an error is happening in one of its methods. The form itself has no code in the error method. I have an On Error handler that is being called. It logs the error and for this particular error has:
>
>
>On Shutdown Quit
>Quit
>
>
>The next thing I see is another error on the next line of the form method, duly logged by the error handler and which also should QUIT.
>
>This system is a mashup of SPRs and forms, so I suspect I'm not clearing something in the error handler that should be cleared before quitting. The call stack has 2 SPRs, and a PRG that calls the form and then does a Read Events.
>
>Any help appreciated.
>
>June


It looks like the issues are due to the form not graciously handing its forced closing due to the Quit.

I've finally figured out ways to replicate the problem. In testing, I wound up with a cursor being referred to in a grid BeforeColChange that was firing during the shutdown process, after the cusrsor had been closed. This caused another error, etc. Neither the form nor any of the controls have any Error event code, which looks like that contributes to the problem.

The form has a QueryUnload, but with no Error event handling in the form, the QueryUnload had no way of knowing if there was an error that should force a close.

I'll be adding Error handling to my base controls & will see how that works.

The error handler worked fine with the 2.6 SPRs, but we are starting to use more forms, and the old error handling just isn't working that well with them.

Thanks for all comments.

June
Previous
Reply
Map
View

Click here to load this message in the networking platform