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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

including config.fpw

Status
Not open for further replies.

Datadis

Programmer
Oct 19, 2000
18
CA
Hi there,
I'm trying to include a config.fpw file in my app in order to (amongst other things) prevent it from generating ressource files (foxuser.*) and using VFP9 help, because I'm using the F1 key for other purposes.

My config.fpw file contains the following:
Code:
screen=off
codepage=auto
outshow=off
EXCLUSIVE=OFF
EXACT=OFF
REPORTBEHAVIOR=90
DELETED=ON
NOTIFY=OFF
RESOURCE=OFF
CONFIRM=ON
HELP=off
DATE=ANSI
CENTURY=ON
Most of those settings used to be in my starting prg as SET command value and worked fine, but I wanted to gather those in a config file for the sake of lisability...

The problem is my app doesn't seems to take those settings into account. Where am I supposed to include the config file in my Project manager? I tried putting it in code->programs, others->textfiles and others->other files, and it doesn't work...

Any help will be appreciated, thanks

Pascal Marier-Dionne
Québec
 
I always include mine in the Other->Text Files area of my projects with no problems. Assuming that you haven't marked it as excluded, I'm not sure what you could be running into here. Please note however that some of the commands you are listing are scoped to the current datasession.

boyd.gif

SweetPotato Software Website
My Blog
 
I always include mine in the Other->Text Files area of my projects with no problems.

Me too. As you say, the key is to make sure that the file is included in the build.

Right-click on the file name and select "Include" from the menu. If you can't see "Include" but see "Exclude" instead then that means that the file's already included.

You can double-check the status of the file by opening the Project Info dialog and looking at the Files tab.

Geoff Franklin
 
Thanks Geoff, Craig,

Quite insightful, as ever ;)

I require a precision though; Is it a bad thing that some of my set commands in the fpw are scoped to the current datasession as Craig mentions? Should I keep in my config.fpw only those that are, or those that aren't?

Thanks again, and happy new year to you all!

Pascal Marier-Dionne
Québec City

p.s.: btw, including the fpw in others->textfiles did the trick for RESSOURCE=OFF, I can't tell yet for the F1 part, since I'm trying to get a distribuable version of my app and encounter problems, but that'll be covered in another thread... see you there!
 
Hi Pascal,

There is no rule that dictates how to handle SET commands. Graig's comment was meant make you aware of one of VFP's gotcha.

If your application behaves the way you want then you should leave it as is. If you need to set Datasession specific set commands, I would suggest that you create an object (based on a lite weight class like relation) that would contain your set commands in the INIT event. You could then create an object based on this class in your form's INIT event.



Jean
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top