Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
1929 and 1938 errors after recompile under VFP 9
Message
De
25/08/2005 15:12:47
 
 
À
11/08/2005 15:43:35
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:
01044039
Vues:
22
Update: This is still happening, but now in the mousedown event of a grid on a pageframe. I haven't been able to reproduce in the IDE where I can trace it. It occurs intermittently in the live application, but somwewhat frequently. Any one have an enlightening explanation about this error? It sounds like a Zen Koan, but when is an object on a form not on a form?
Error number:       1938
Error message: Object is not contained in a FORM.
The error occurred in : dd.pageframe1.page3.grid1.MouseDown
Line #  :          0
>Hi Peter,
>
>I deleted the offending combobox from the form. It was a lookup for a code to be filled in, in a text field. I replaced it with a small dialog box containing a pick list, that my users can get to by hitting F1 when they need the help. This seems to have helped.
>
>>Great,
>>
>>Now I suggest you do one of two things (or both):
>>
>>1) It's a bit like voodoo, but ask Sergey - that usually fixes any remaining problems :-)
>>
>>2) This is definitly voodoo, but it has helped me once, so maybe it's worth a try:
>>I'm assuming you are working with classes rather than forms.
>>Create a new class lib, "TempLib", and drag the offending classes to this lib. Remove them from the original lib, pack the original vcx and drop and drag them back from TempLib.
>>
>>HTH
>>
>>
>>>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
Répondre
Fil
Voir

Click here to load this message in the networking platform