Re: Re-Post: Project Path References
- From: "swdev2" <wsanders@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 26 Apr 2007 00:57:45 -0600
1. you need a 'set path ' statement somewhere
2. most of the paths are stored internally in all of the vfp objects - ie -
reports, forms, classlibs. you can add in a project hook to yer vfp project
file, and add in code to the 'beforebuildevent' that opens up all of the vfp
objects ***as tables** , look for pathing and drive letters, and strip out
what you need to have removed. The Compiler is supposed to do this, but
I've been doing the stripping since vfp V6, and it's fixed all of the
internal references that couldn't get resolved otherwise.
3. There are more robust ways to test your application prior to end-user
deployment. Pick One, stick with it. Just because it runs on YOUR frickin'
machine, is meaningless. Machines are cheap - get another machine for
testing.
4. This is a meta / data driven (of sorts) calling method -
=rpt_opts("..\forms\inv_loc.frx", "Inventory Listing by Location",
"..\output\inv_loc.txt")
There's nothing wrong with it, but the compiler can never , ever (in my
lifetime or yours), find and reference, and FIX the internal reference to
the physical location of that inv_loc.frx file. Never. Ever. In yer
development environment, make sure the 'set path' statement includes the
forms folder and REMOVE the ("..\forms\) reference . In yer
production/deployment 'image' - make sure that the contents of the 'forms'
folder is either 1) included in the compile set or 2) is external to the
compile set and you've moved the files to somewhere in your project hiearchy
referenced below.
grrrr..
after a third read - I'll suggest to you that you don't have a 'set path'
statement anywhere.
Warmest Regards [Bill]
--
===================
William Sanders / EFG VFP / mySql / MS-SQL
www.efgroup.net/vfpwebhosting
www.terrafox.net www.viasqlserver.net
<tjoister@xxxxxxxxx> wrote in message
news:1177511797.256257.302430@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Sorry for the re-post, but I posted this yesterday, and it never
showed 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")
The project directory structure looks like this:
<Application Name> <----- Project file resides here.
<Source>
<Forms>
<Graphics>
<Programs>
<Reports>
When I build the executable and distribute it, it seems to work, 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 while developing.
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. Also, is there a
simple set of guidelines for path resolution that works with the
project organization I've described above?
Any help would be greatly appreciated!
.
- Follow-Ups:
- Re: Re-Post: Project Path References
- From: Tim Oister
- Re: Re-Post: Project Path References
- References:
- Re-Post: Project Path References
- From: tjoister
- Re-Post: Project Path References
- Prev by Date: Re: Application/Executable Path References
- Next by Date: Re: Re-Post: Project Path References
- Previous by thread: Re-Post: Project Path References
- Next by thread: Re: Re-Post: Project Path References
- Index(es):
Relevant Pages
|
Loading