Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Executing memo code and calling form
Message
From
21/02/2013 11:06:22
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01566590
Message ID:
01566680
Views:
49
>>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.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform