Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Executing memo code and calling form
Message
De
21/02/2013 10:26:45
 
 
À
21/02/2013 09:03:50
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01566590
Message ID:
01566677
Vues:
48
>>>Hi,
>>>
>>>I'm running an exe and there's a part of the program that uses EXECSCRIPT() to run some code in a memo field. The problem I have is that the code in the memo field is trying to run a form but I'm getting the error "File 'frmFilter' does not exist", I guess since the code is not in the exe it cannot see the form. Any workarounds to be able to run the form?
>>>
>>>Thanks!
>>
>>How about:
>>1. A "helper" procedure in the EXE that launches the form for the called script (make sure this "helper" is visible in the call stack either by being part of a SET PROCEDURE or simply being a procedure defined in a PRG that is already within the call stack)
>>2. Define the form as a class and make sure the classlib is already loaded.
>
>Alternately, have a function in the main prg (but a function, not a method belonging to an object, as that will execute in the datasession in which that object was created, and may not see the necessary aliases) which will create the form and return a reference to it. Or, alternately, have a factory object living outside of the script but available to it (and executing in the current datasession) which will create the form and return a reference.
>
>Basically, createobject() inside an executed script doesn't see the classes etc defined in the app. But it can see variables, functions, objects - one of which may be what's needed to create an object.


I forgot to mention that this is an executable that I cannot change. So the only solution up to know is to create the popup thru code in the memo and then call it, it's basically a form with a combobox where they can choose a store and it will filter on that store, never done that but I imagine I can recreate the form with all the code (mainly in the combobox)?

Thanks.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform