Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Redefine THIS. error
Message
From
19/05/2021 15:50:27
 
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
01680602
Message ID:
01680606
Views:
44
That are the values for aAppForms[nRow,3] and aAppForms[nRow,6]? it is possible one of these could the the 'THIS'?


>>Hi,
>>
>>Do you know what would cause the error?
>>
>>cannot redefine THIS.
>>
>>
>>TIA
>
>This is the code that caused the above error. Note that I am trying to create a reference to a window 3 times. What happens is the 1st time the actual error shows (dreaded ... error reading .... myprg.fxp)
>
>But on the 2nd and 3rd time, the error is "CANNOT REDEFINE THIS."
>
>Of course, I will remove this code that tries to instantiate the window 3 times. But I would to learn what causes it.
>
>Here is the code:
>
>FOR iTry = 1 TO 3
>		
>	*-- Start with No Problem
>	lProblem = .F.
>	TRY 
>		aAppForms[nRow,5] = NEWOBJECT( aAppForms[nRow,3], aAppForms[nRow,6] )
>	CATCH TO oError
>		lProblem = .T.
>		cCompName = GetEnv("COMPUTERNAME")
>		TRY 
>	 		STRTOFILE( TTOC(DATETIME()) + " Try: " + ALLTRIM(STR(iTry)) + " Failed to 
>                    create NEWOBJECT() in OpenAppForm() Class: " + aAppForms[nRow,3] + " Lib: " + 
>                    aAppForms[nRow,6]  + oError.message + CHR(13) + CHR(10), GetGlobal(2) + 
>                   "create_object_problems.log", 1 )
>	 	CATCH 
>	 	ENDTRY 
>	ENDTRY 
>	IF lProblem
>        	*-- Wait 2 seconds and then try again.
>		INKEY(2)
>		LOOP 
>	ELSE 
>		EXIT 			
>	ENDIF 
>ENDFOR 
>
"You don't manage people. You manage things - people you lead" Adm. Grace Hopper
Pflugerville, between a Rock and a Weird Place
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform