Re: Application/Executable Path References
- From: "Fred Taylor" <ftaylor@xxxxxxxx!REMOVE>
- Date: Wed, 25 Apr 2007 08:24:47 -0700
That may be because as an .EXE, the reports, etc are "found" within the .EXE
itself, and the path with the originals is not required. As an .APP,
there's nothing built in, and the files must exist in the original paths.
--
Fred
Microsoft Visual FoxPro MVP
"tjoister" <tjoister@xxxxxxxxx> wrote in message
news:1177512794.008789.302910@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
If this post shows up multiple times, I apologize, but I've posted it
to no avail 3 separate times, and it didn't show up.
I've created a project file in VFP 9 that contains all of the common
code that is used throughout all of the applications I build. I built
this code into an application and include the application file in all
of the other application project files. Where the problems pop up is
in folder references called by some of these common functions.
For example, I have a customized report dialog that lets the user
preview the report, select the printer, print the report, or save it
in a text file. It is called as: =rpt_opts("FRX file with path",
"dialog box title", "default text file output name").
A calling example is: =rpt_opts("..\forms\inv_loc.frx", "Inventory
Listing by Location", "..\output\inv_loc.txt"), which does the
following if the user chooses to preview the report:
REPORT FORM &tcRptName PREVIEW
The standard project directory organization that I use is:
<Application Name> <------ This is where the project resides.
<Source>
<Forms>
<Graphics>
<Programs>
<Reports>
When I build the executable and distribute it, it seems to work fine,
but when I run it from my local machine as an APP, I get "file not
found" errors, because I don't have a ..\forms folder in the working
directory structure in my development environment.
What confuses me is how are references resolved in applications. I've
been doing this sort of thing for a long time and it never seemed to
be a problem before. How should I code calls to other folders,
especially in function calls? When the application is built, it was
my understanding that all references were resolved and the resulting
APP/EXE removed the need for these references.
Is there a different way to handle path references in generic function
calls, especially in this example, because I don't want to copy all of
the reports or forms along with every application. Or more
specifically, is there a better way of dealing with paths using the
project organization structure I'm using.
Any help would be greatly appreciated!
Tim
.
- Follow-Ups:
- Re: Application/Executable Path References
- From: Dan Freeman
- Re: Application/Executable Path References
- References:
- Application/Executable Path References
- From: tjoister
- Application/Executable Path References
- Prev by Date: Application/Executable Path References
- Next by Date: Re: Odd VFP DO WHILE Behavior
- Previous by thread: Application/Executable Path References
- Next by thread: Re: Application/Executable Path References
- Index(es):
Relevant Pages
|
Loading