>Hi Naomi
>
>why would that help ?
>
>Nick
>
Clear all releases all variables including the dangling references. Sometimes CLEAR ALL produces an error, that's why you need to wrap it in the try/catch.
Here is what I have when I need to return back to development after I had a bug in development and left in the limbo state:
try
CLEAR ALL
CATCH
CANCEL
CLEAR ALL
ENDTRY
CLOSE ALL
SET SYSMENU TO default
ON SHUTDOWN
>
>>You may try clear all (in try/catch) twice.
>>
>>>Thanks Sergey.
>>>
>>>Is there a global way to clear all dangling references ?
>>>
>>>Otherwise as those articles imply a rewrite I think I would have to go with the kill process.
>>>
>>>>Only one READ EVENTS is in effect at any given time. You cannot stack them. The most likely reason for 'Cannot Quit Visual Foxpro' message are dangling references. Check
http://www.foxpert.de/docs/safeclasses.en.htm and
http://my.advisor.com/doc/13113>>>>
>>>>>
>>>>>I've installed an on error routine in an application.
>>>>>
>>>>>Its an old app that has a lot of errors and users are used to ignoring them. I've put in an ON ERROR routine so I can log the errors and iron out the worst offenders.
>>>>>
>>>>>In the on error routine I give the user the choice of carrying on or quitting.
>>>>>
>>>>>If they select quit I
>>>>>
>>>>>CLEAR EVENTS
>>>>>QUIT
>>>>>
>>>>>But sometimes when the users select quit they get Cannot Quit Visual Foxpro.
>>>>>
>>>>>I suspect there are paths through the system that may issue another READ EVENTS. Could this cause the problem above ? Are READ EVENTS nested ?
>>>>>
>>>>>Nick
If it's not broken, fix it until it is.
My Blog