Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CRASH: execscript and dynamic class
Message
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Title:
CRASH: execscript and dynamic class
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01016631
Message ID:
01016631
Views:
51
VFP8 crash, too.
PUBLIC mmform
mmform = CREATEOBJECT("myForm")
mmForm.show

DEFINE CLASS myForm as Form
	
	PROCEDURE Load
		
		defineFlylabel = ""
		 
		TEXT TO defineFlylabel TEXTMERGE NOSHOW
			SET PROCEDURE	TO SYS(16) ADDITIVE
      		DEFINE CLASS mylabel as Label

			ENDDEFINE
		ENDTEXT
		
		=EXECSCRIPT(defineFlylabel)	&& this load the procedure, and destroy IT
		
		* workaround
*			RANDOMFILENAME=FORCEEXT(FORCEPATH(SYS(2015),SYS(2023)),".TMP")
*			
*			STRTOFILE(defineFlylabel,RANDOMFILENAME)
*			COMPILE (RANDOMFILENAME) NODEBUG
*			ERASE (RANDOMFILENAME)
*			DO (FORCEEXT(RANDOMFILENAME,"FXP"))
		
		this.AddObject("someName","myLabel")	&& CRASH when you try to use a class definition
* VFP internal structure it becomes incoherent
	
	PROCEDURE UNLOAD
		SET PROCEDURE TO
		
ENDDEFINE
Next
Reply
Map
View

Click here to load this message in the networking platform