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!

SET PROCEDURE

Status
Not open for further replies.

sashaDG

Programmer
Jun 20, 2022
112
BY
How to configure the function so that it would not be necessary to specify an absolute path?

There is a fileproc.prg with procedures, when I write "SET PROCEDURE TO fileproc" it does not work, but it works when I write through an absolute path

I used the CURDIR() function, in theory it should return the path pjx, but return wrong path(may be default)
 
Let's get this clear. Is fileprog.prg in your default directory? You can check that by typing [tt]CD[/tt] in the command window. The name of the default directory should appear on the background screen.

Or, is fileprog.prg in your VFP search path? You can check that by typing [tt]SET ("PATH")[/tt] in the command window. You will see a list of all the directories in the search path.

If the answer to either of the above is Yes, then that's all you need. The SET PROCEDURE should work. If it doesn't, then either the filename is wrong or there is something wrong with the name of the function or procedure that you are calling.

If the answer to either of the above questions is No, then you should move the file to a directory that is in the search path.

Note that the above only applies when you are running your program in the development environment. When you build the EXE, all the PRGs will be bound into the executable, and the pathing won't be an issue (provided VFP can find the files during the build, of course).

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Sasha, I tried a few days ago to answer your question. Was that answer any help? Do you still have the problem? It would be helpful to have your feedback, if only for the benefit of anyone else with a similar problem.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Sasha,

I don't want to discourage you from using the forum, but you are not going about it the best way.

Your latest question is about a button on a pageframe. This has nothing to do with the subject of this thread, which is the problem with your procedure file. What you need to do is to start a new thread for your new question. That way, forum members will be able to see what the thread is about before clicking through to it, which means it will be more likely that you will get an answer. It will also help other people with a similar problem to find the thread. To simply tag your question on to an existing thread just causes confusion.

Also, when you post a question and get an answer, it's really helpful if you could respond to the answer to say whether it was helpful to you, or whether you still have the problem. It's also common courtesy to at least acknowledge the answer.

These are simple concepts that apply to all forums. If you keep them in mind, I'm sure you will get a lot more benefit from your presence here.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
I'm sorry, I thought I'd create a new question. In the SET PROCEDURE, I forgot how I solved this issue
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top