Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Should SHUTDOWN be a prg or a proc?
Message
From
18/04/2001 14:38:18
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00496848
Message ID:
00496890
Views:
13
>>>I have 'ON SHUTDOWN DO ShutDown_Proc' in my main. I later do an 'ON SHUTDOWN DO oapp.Shutdown_Proc()' in my toplevel form object. What is good coding practice for the ON SHUTDOWN. Should it be in a .prg?
>>>
>>>Brenda
>
>
>>What you've done is fine.
>
>Guess I should have given more info. I was on the phone with my client and she started the software and got into what I call "ERROR MESSAGE HELL" (she was copying some data files from CD and did not remove the read-only attribute so she got the can not update cursor error). The error messages went on forever so she Alt+Ctrl+del, selected the task, and end task. She then tells me that she got a "shutdown_proc.prg missing" error and that she has gotten it before. I do not know if it was the first error message but definately she was still in the main (not the toplevel form SHUTDOWN). Anyway, I tried to reproduce the error but evertime I try to end task it works fine. The ShutDown_proc is a procedure in my main.
>
>What do you think? Could some other first error during the end task get the program confused and not be able to find the ShutDown_proc?
>
>Brenda


This sounds like a problem with the error handler, not ON SHUTDOWN. What happened was that the object reference to oApp had been destroyed. When you do that, you should reset ON SHUTDOWN to it's default.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Reply
Map
View

Click here to load this message in the networking platform