Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dynamic Procedures
Message
De
07/08/2002 12:53:58
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Dynamic Procedures
Divers
Thread ID:
00687124
Message ID:
00687124
Vues:
61
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform