Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
1929 and 1938 errors after recompile under VFP 9
Message
De
08/08/2005 14:18:47
 
 
À
08/08/2005 04:47:45
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Versions des environnements
Visual FoxPro:
VFP 9
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01038888
Message ID:
01039363
Vues:
28
This worked, at least the error method does what it is supposed to now. The other issues remain. Re-constructing the combo box on the form did not help. Those 2 errors persist.

>Jim,
>
>I don't know about these errors but I do have a solution for your quit problem.
>
>In your main program
>
>
>Declare ExitProcess IN Win32API Integer ExitCode
>
>
>In your errorhandler object
>
>* Do all your logging
>* Maybe warn the user that you've run into something you can't handle
>Close All
>Release All
>Clear Events
>=ExitProcess(16)
>
>
>
>
>
>
>>Hi all,
>>
>>I'm having some issues after recompiling from version 8.0 sp1 into version 9.
>>
>>See Thread# 1038518 , which helped with some of the occurences of these 2 errors. The referenced methods are not usually where any culprit lies, ex: the mousedown event was one place referenced, and it has no override code in it, for that form.
>>
>>Re-creating an offending combo box helped some. Is there a procedure I should have followed to port to version 9, other than recompiling the projects? Any guidelines would be an extreme help.
>>
>>These 2 errors are happening frequently in one of my main data entry forms.
>>
>>Error number:       1929
>>Error message: THISFORM can only be used within a method.
>>The error occurred in : newid
>>Line #  :          0
>>
>>
>>
>>Error number:       1938
>>Error message: Object is not contained in a FORM.
>>The error occurred in : dd.pageframe1.page3.unitcombo.GotFocus
>>Line #  :          0
>>
>>
>>
>>Other issue: My error method from the project form class no longer closes the program after an error, as it was doing. In the code below, after creating an errorlog record, the 'close all' command gets run, but the QUIT fails to quit, which leads to a cascade of further errors, that have to be answered until you can be allowed to close the form.
>>
>>
>>LPARAMETERS nError, cMethod, nLine
>>local cMsg,cCode,cINfo, lHandled
>>cMsg =  'Error number: ' + STR(nError) + chr(13)
>>cMsg = cMsg + 'Error message: ' + MESSAGE( ) + chr(13)
>>cMsg = cMsg + "The error occurred in : " + cMethod + chr(13)
>>cMsg = cMsg + "Line #  : " + str(nLine) + chr(13)
>>
>>lHandled = .F.
>>
>>THISFORM.cLastErrorTxt = cMsg
>>_cliptext = ""
>>_cliptext = cMsg
>>
>>IF !lHandled
>>	thisform.prtmsg( 'A fatal error has occurred.' + CHR(13) + ;
>>		'This program will now be shut down.' + CHR(13) + ;
>>		cMsg)
>>	cCode = MESSAGE(1)
>>	cInfo = sys(2018)
>>	use l:\shared\errlog in 0
>>	select errlog
>>	append blank
>>	replace errnum with nError
>>	replace errmsg with MESSAGE()
>>	replace method with cMethod
>>	replace line with nLine
>>	replace CODE with cCode
>>	replace info with cInfo
>>	replace init with thisform.cInit
>>	replace form with thisform.name
>>	replace system with thisform.cSystem
>>	replace errtime with datetime()
>>	use
>>	If !thisform.test
>>		Close all
>>		Quit
>>	Else		&& assumes testing in app, not exe.
>>		DEBUG
>>		SUSPEND
>>	Endif
>>ENDIF
>>
>>
>>
>>thanks,
Jim Newsom
IT Director, ICG Inc.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform