Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Writing a form tester.
Message
 
À
26/06/2006 15:41:05
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
01131812
Message ID:
01131814
Vues:
16
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:
    Those who need closure
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform