In VFP 6.0 SP3 the COMPILE command is enabled in the run time. In the following example the program file with the class description is generated. Then the compilation is carried out, the object is created, the method is called, then the object leaves.
* =================================
* Compile Test
* -----------------
* Generate PRG file
MESSAGEBOX("Start PRG File Generation")
SET TEXT TO ("Test01.PRG") NOSHOW
SET TEXT ON
\DEFINE CLASS TestClass AS CUSTOM
\PROCEDURE Test
\MESSAGEBOX("<>")
\ENDPROC
\ENDDEFINE
SET TEXT TO
* Compile program
MESSAGEBOX("Start PRG Compile")
COMPILE ("Test01.PRG")
MESSAGEBOX("Compile is OK")
* Create Object
LOCAL oObj
oObj=NewObject("TestClass","Test01.PRG")
oObj.Test()
oObj=null
* =================================
When we start the program for the first time all is OK.
We start once again and the program do canceled on compilation.
Why? And how to solve this problem?
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement