Jim,
You could call your forms with the NAME clause thereby maintaining a reference to it. Then, you could wrap the READ EVENTS in an IF that checked for the existence of the form.
HTH,
Chad
>I have started working on a program to go through the forms in my project and quickly run them one by one, as a test. I made some class changes and I want to look for anything unusual. Below is my first try at this. It's adapted from another one I use to clear object code out of forms.
>
>Some of my forms abort themselves by returning .F. in the load method or the Init method if certain conditions are not met. That is by design, however if that happens this harness program stops on READ EVENTS and waits for something to happen. I guess I don't know how to make it keep going.
>
>
>*run each of the forms for icgoil project.
>Close Tables All
>Close Databases All
>Clear All
>Release All
>Set Classlib To
>Public nCount, cFile, cFile2, cSrch
>Clear
>Cd c:\Development\icgoil\Forms
>nCount = Adir(MyArray, '*.scx')
>If nCount > 0
> For i = 1 To nCount
> Cd c:\Development\icgoil\Forms
> cFile = Juststem(Alltrim(MyArray(i,1)))
> ?cFile
> cFile2 = cFile+'.scx'
> If File(cFile2)
> TRY
> Wait "processing ..."+' - ' +cFile Window Nowait
> DO FORM &cFile
> READ EVENTS
>
> CATCH TO oException
> DEBUG
> SUSPEND
> ENDTRY
> CLEAR EVENTS
> Endif
> Endfor
>Endif
>
>
>Use
>
>Close Databases All
>Close Tables All
>Set Classlib To
>Clear All
>Release All
>
>
_________________________________
There are 2 types of people in the world: