Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Running the app from within foxpro
Message
From
09/04/1998 09:15:54
 
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00090589
Message ID:
00090739
Views:
26
I'll try the first one. Thanks!

-Michelle


>The problem is that the CONFIG.FPW is evaluated when the VFP executable is started, not when the application is started. When firing the executable outside of VFP, the internal CONFIG.FPW is examined and used to establish the runtime environment before your application gains control. That's not the case when you start VFP directly - VFP starts execution, uses whatever CONFIG.FPW is in it's search path (or is specified with -c at invocation) and then you foire your app. When the app starts, the runtime environment is established already, and the internal CONFIG.FPW isn't evaluated.
>
>Some simple solutions:
>
> (1) Set up a shortcut for debugging that invokes VFP with the proper CONFIG.FPW before beginning to debug. The -c switch allows the specification of a CONFIG.FPW at runtime invocation As an example:
>
> VFP -cC:\MyApp\Debug\CONFIG.FPW
>
>would start VFP using the CONFIG.FPW found in the directory C:\MyApp\Debug. You do not have to name it CONFIG.FPW when set with -c, for example:
>
> VFP -cC:\MyApp\DevArea\CONFIG.DEV
>
>would start VFP using a file called CONFIG.DEV instaed - I use this to set up multiple CONFIGs, one for production, linked into the .EXE, and another for debugging. This allows you to set up a debug environment easily.
>
> (2) Evaluate the CONFIG.FPW at runtime. This is considerably trickier; you'd need to determine whether you're in a debugging environment (I use a DOS environment variable, and examine it using GETENV() to retrieve it at runtime) and then write a short routine to evaluate the content of the CONFIG.FPW before your app gains control. The biggest problems with this approach is that certain things can only be set before VFP starts (such as the TMPFILES directory) and you still need to find the right CONFIG.FPW to evaluate.
>
>hth,
Previous
Reply
Map
View

Click here to load this message in the networking platform