Donquick


Hi,

I am using VFP6.0. Acouple of questions about application creation.

1) I notice a config.fpw is created in the progs area by the application builder, which is presumable just for setting up config for this application. If i modify the fpw by putting a 'Command = XXX' line in it and generating the application then it doesn't seem to run the command when the app starts. Similarly using the _STARTUP = "XXX.prg" doesn't seem to run the prog specified either. In both cases the application starts to the desktop and goes straight to the menu system and waits for user input. What am I doing wrong Thanks.

2) I have chosen to use the user logins option for the application. It is working well but where do i administer the user database from Thanks

Don




Re: CONFIG in top-level application

Naomi Nosonovsky


Are you sure you're running with this config.fpw in effect Is it in the same start directory where the application resides

Because it would run your command specified in the COMMAND otherwise.

You second question is unclear. What exactly do you mean






Re: CONFIG in top-level application

Donquick

Hi Naomi, Thanks for the answer.

1) I think it is in the right place. I have a main directory in the root of the disc called C:\FOODAPP I have created this specifically for this application as i find it a pain to navigate around in the VisualStudio/vpf directory structure. The application builder seems to create a series of subdirectories called PROGS, REPORTS, LIBS, etc. In the root directory C:\FOODAPP is a file called config.fpw which was created by the app builder and this is the one i am editing. I then build.. an application called FOODAPP which creates a file in the directory which i can run inside Foxpro or I can build an executable which replaces the app with an exe and i can run that.

I think i might have a path problem, as I am forever having to use 'set default to' and 'set path to' to get everything in the right place. But anyway, this is where the config is, but i don't know of the builder is including it when it is generating the .app or the .exe I know when i used to use fpw 2.6 that you had to add a call to the config on the desktop shortcut - and they still refer to that on the MSDN files but i can't see where you might do that with the application being built for you.

2) The user thing - i was just wondering if there was a data base created which stored the user names and passwords and security levels or something - or is just so that you can code for particular users. When i set up my user name it said something about being a 'basic user' whihc imples there are different security levels which can have different access rights and can be coded into the app.

Thanks again.






Re: CONFIG in top-level application

Naomi Nosonovsky

Donquick wrote:

Hi Naomi, Thanks for the answer.

1) I think it is in the right place. I have a main directory in the root of the disc called C:\FOODAPP I have created this specifically for this application as i find it a pain to navigate around in the VisualStudio/vpf directory structure. The application builder seems to create a series of subdirectories called PROGS, REPORTS, LIBS, etc. In the root directory C:\FOODAPP is a file called config.fpw which was created by the app builder and this is the one i am editing. I then build.. an application called FOODAPP which creates a file in the directory which i can run inside Foxpro or I can build an executable which replaces the app with an exe and i can run that.

I think i might have a path problem, as I am forever having to use 'set default to' and 'set path to' to get everything in the right place. But anyway, this is where the config is, but i don't know of the builder is including it when it is generating the .app or the .exe I know when i used to use fpw 2.6 that you had to add a call to the config on the desktop shortcut - and they still refer to that on the MSDN files but i can't see where you might do that with the application being built for you.

It sounds like the config.fpw is in the right place, so if you just run VFP from your startup directory it will run your main program. Otherwise config.fpw is important to specify some default settings and especially temp directory.

Donquick wrote:

2) The user thing - i was just wondering if there was a data base created which stored the user names and passwords and security levels or something - or is just so that you can code for particular users. When i set up my user name it said something about being a 'basic user' whihc imples there are different security levels which can have different access rights and can be coded into the app.

It looks to me you used some VFP Wizard to create your project. I would guess, it does indeed use a table. Check what tables do you have in your Data directory.

Thanks again.





Re: CONFIG in top-level application

Naomi Nosonovsky

BTW, in VFP8 and VFP9 you can use SYS(2019) to determine Config file used in the application. It would not help much in VFP6, unfortunately.




Re: CONFIG in top-level application

Tamar E. Granor

Actually, SYS(2019) has been around forever. I think it goes back to whenever Config.FP files were added to the product.

Tamar




Re: CONFIG in top-level application

Naomi Nosonovsky

I stand corrected then. Don't want to launch VFP6 to test Smile





Re: CONFIG in top-level application

Donquick

That is interesting, thanks.

So i have now called a prog from the menu system which prints the sys(2019) to the screen. The result is that there is no config in use. I have incorporated it into the app to make sure and there is still no result. So I am pretty sure there is no config being referred to.

Do i have to call the config in the application somewhere - maybe in the main prog generated by the app builder

Again, I think this is all to do with paths etc. I have a hunch that the app is not setting the default directory to my c:\FOODAPP folder in time to access the config.

What do you guys do Do you agree that it is easier to start a new root elvel dir for an app rather than navigating the complex visual studio directory tree - if so, are there any path or default commands that i need to set and if so where in the code.

Thanks,

Magnus





Re: CONFIG in top-level application

Naomi Nosonovsky

I usually just place config.fpw in the same directory as the application and make sure I run the application from this directory.

You can also just include this config into the project itself (under other files) and thus it would be used.