Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem when using EXECSCRIPT()
Message
De
17/10/2005 06:43:58
 
 
À
17/10/2005 06:12:27
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01059568
Message ID:
01059573
Vues:
10
This message has been marked as the solution to the initial question of the thread.
Agnes,

The code in EXECSCRIPT() runs in a different context to the form. When you use macro substitution, it runs in the context of the form. What you could do to reference THISFORM in EXECSCRIPT() is as follows :-
*-- In the form before calling EXECSCRIPT()
PRIVATE oTHISFORM
m.oTHISFORM = THISFORM
In the EXECSCRIPT code, change the reference(s) from THISFORM to m.oTHISFORM - because you have defined m.oTHISFORM as a PRIVATE variable, it will still be in scope and therefore can be seen by the code in the EXECSCRIPT call.

HTH.



>HI ,
>
>Help me Please .
>
>I use 'Execscript' to run a code which is stored in a table . But an error appeared :'THISFORM can only be used within a method'
>
>with a macro substitution there's no problem . But I want to use 'Execscript'
>
>Regards
-=Gary
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform