I have created a program that creates another program file with procedures defined within, then sets procedure to the just created program, and excutes the procedures just created. This works fine as long as the first file is not built into an exe. If running as an exe I am not able to set procedure to the newly created file, I assume because it is not part of the exe and the exe is not going to look outside itself for components. I could do this with objects but I don't know how to create an object and add methods to it on the fly.
for example:
myprog.prg
newfile = 'abc.prg'
strtofile('procedure myprocedure'+chr(10),newfile,.T.)
strtofile('? "hello"'+chr(10),newfile,.T.)
strtofile('endproc'+chr(10),newfile,.T.)
set procedure to &newfile &&This causes a file not found error
myprocedure()
TIA
Robert
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only