Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Executing memo code and calling form
Message
De
21/02/2013 15:37:39
 
 
À
21/02/2013 11:06:22
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:
01566709
Vues:
57
>>>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)?
>
>Before you try that, see if execscript() can open the form as a table... just try and see if this works
>
>
use myform.scx
>copy to tmp.scx
>do form tmp
>
>If it works, we've just created a copy of the form in the current folder. It would be better to do on getenv("temp") folder. I mean, I tried this and I got the form to run, but the environment in which the form runs may be weird - if it depends on something from within the app, it may not be accessible, unless it's a global and already instantiated; if it has any createobject() in it, it may break.
>
>Your last resort is to take the form you copied out and generate its code using class browser - and build your .prg form based on that. The class browser generated code usually won't run as is, but is rather close to it.

Thanks Dragan, I'll give that a shot!
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform