Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

File '.prg' does not exist

Status
Not open for further replies.

ledu

Programmer
Jul 3, 2001
24
MX
Hi everybody!
I want to thank you for all the answer I received for last question I made.
I have another one which I really want you to answer it.
I have a project this is running like aplication. when I run it this display a message "File '.prg' does not exist"
how can I do to this message doesn't be displayed.
I don't know if the problems can be that I have a form set main and .not. a program. could be?
 
It sounds like you are using a DO program or have a call to a function that is not available. If you are in need of a function, can you create a UDM (user defined method) of that form or form set. This is just an idea.
 
Having a form set as main rather than a .prg only causes problems when compiled into an .EXE, as far as I know. You might do well to just create a .PRG file that simply calls your main form and set the .PRG as main.
 
On second thought, your .PRG should have 2 lines:

do form MyStartForm
READ EVENTS

Then make sure your Destroy() or Unload() event on your main form has:

CLEAR EVENTS
 
Hi !
I already put a program set main but this doesn't solve the problem the question is when I run my proyect in vfp system doesn't display the message but when I do in aplication it is diaplayed.
I'd thank you any help!
Thanks!
 
Hi !
I already put a program set main but this doesn't solve the problem the question is when I run my proyect in vfp system doesn't display the message but when I do in aplication it is diaplayed. This is the firts message before displayind my proyect then it run correctly.
I'd thank you any help!
Thanks!
 
I think that generally the problem is that you aren't in the proper directory to find the .prg file you need. Often this is because your development environment has set the path to include all the subdirectories you need but when you run the program directly the path hasn't been set.

I know run a 'dave.prg' program to set the paths and then call the FoxPro projectI'm working on. You might want to do the same thing for your application. Or as ClayTech suggested, just put it in the form directly either in the init (or whatever) or in a separate user-defined method or property. The major problem with this way of doing things is that it can't be easily changed for different users if they have different set-ups. Having a separate file makes it easier to modify.

Dave
 
check out the flow of your program from the start. it may be calling a do (something.prg) and that something.prg is not included in your project. so when you run your application from another directory, it cannot find the prg and hence the error. if this, then try manually adding the prg to your project in your development directory and rebuilding the application. hope this helps.
 
Try using this command in your main PRG Filenames do not require paths or even extension so long as the files themselves are included in your project.

SET PROCEDURE TO [FileName1 [, FileName2, ...]] [ADDITIVE]

Specifies the sequence in which files are to be opened. SET PROCEDURE can take more than one file name, allowing you to open several procedure files at once. This option allows you to create stand-alone libraries of functions and specify them separately.




-Pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top