Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ExecuteScript not working when building app
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00930335
Message ID:
00930369
Vues:
18
Thanks for your reply Sergey. We did notice that it was creating a temporary program file. However, we were confused as to how it could find other programs in our app but not a form in our app.

In other words, if I had:
do testprogram
in the memo field, executescript would handle that just fine. What makes the difference?

Thanks again for your help.

Rodd

>Rodd,
>
>The ExecuteScript() function creates temporay .PRG with your code, compiles and executes it. Because it's external program, it cannot see Forms or Class Libraries within EXE it's launched from.
>
>>We have a custom built framework that allows us to run in two modes. We can run in a mode where all our programs are in directories and our framework ensures that we point to the right directory before calling a program. We can also run as an App where directories are ignored and all the programs are built right into the app.
>>
>>In our framework, pressing a button calls a routine that looks up the program & button name in a table and looks in a memo field to find out what is supposed to happen on the click event of the button. Our code is using ExecuteScript() to run the Click Event code from the memo field.
>>
>>This has been working great up until yesterday. Yesterday I added the following in my buttons' memo field:
>>
>>do form form1 with '','379200'
>>
>>This was the first time we directly launched a form from a button. Up until this time, the memo field has always contained either VFP commands or calls to programs (not forms).
>>
>>This "do form" works great when we run in the directory/non-app mode but it fails to find the form when we run in the app mode. If we macro the memo field instead of using ExecuteScript, everything works great ... even in app mode. In other words, the form IS included in the project and can be run from the app.
>>
>>Does anyone have any ideas why the macro would work and ExecuteScript() wouldn't when running from an app?
>>
>>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform