Good day!
I have included the CLEAR ALL command in my ON SHUTDOWN procedure in order to successfully close & clean up my application. If for example, the last form I have executed is a modeless form, I don't have any trouble closing my application. However, if I have last executed a modal form, I always get the error message: 'Cannot clear the object in use'. I have read in vfp help that the cause of this error is that the method or event code for that object is currently running; and it recommends that I interrupt the running code or wait until it completes before clearing memory.
I'm not really knowledgeable in pure object-oriented programming in vfp, as I use the Form Designer in order to create my forms and I don't use wizards too. I have tried to understand and use the CREATEOBJECT function, and honestly, I still encounter the same problem I have stated. With this, I would very much appreciate any explanation as to what the error message I have stated above, means. Also, how do I interrupt the running code? If I'm right, I think I can't use the CANCEL command because I know that it will end the execution of my entire application.
Please do help me out, I've been trying to solve this problem for some time now. I would very much appreciate any kind of advice you can give me. Thank you very much.
I have included the CLEAR ALL command in my ON SHUTDOWN procedure in order to successfully close & clean up my application. If for example, the last form I have executed is a modeless form, I don't have any trouble closing my application. However, if I have last executed a modal form, I always get the error message: 'Cannot clear the object in use'. I have read in vfp help that the cause of this error is that the method or event code for that object is currently running; and it recommends that I interrupt the running code or wait until it completes before clearing memory.
I'm not really knowledgeable in pure object-oriented programming in vfp, as I use the Form Designer in order to create my forms and I don't use wizards too. I have tried to understand and use the CREATEOBJECT function, and honestly, I still encounter the same problem I have stated. With this, I would very much appreciate any explanation as to what the error message I have stated above, means. Also, how do I interrupt the running code? If I'm right, I think I can't use the CANCEL command because I know that it will end the execution of my entire application.
Please do help me out, I've been trying to solve this problem for some time now. I would very much appreciate any kind of advice you can give me. Thank you very much.