Subject Re: Help f1 problem Solutiom
From charlie <tm@tc.com>
Date Wed, 11 Sep 2024 12:54:02 -0400
Newsgroups dbase.getting-started

Point well taken Akshat,

Thanks for getting back to me on this.  Isn't the only thing the user can change in the setup where the app folder is located?  I am thinking it would be highly unusual for the user to change the location of the bde, which is where I am pointing the junk.bat  path to.  If the user should go into their computer and manually change bde locations, etc, they are looking for trouble.  But I think that I will add a warning in help just in case.  

I do have some _app path variables in the initial program though.  I'll look into dealing with this there.

Almost done with this thing.  I have learned so much on this project it is crazy.  But there is so, so much more to learn it is crazier!!!!

Thanks so much for your help!



Akshat Kapoor Wrote:

> Good Evening Charlie,
>
> > Hi guys..  Thanks for your input.   Unless someone can give me a good reason not to, I have decided to hard code the path at line 1193 in miscapi.
> >
> > I had put the chacha.chm file back in the app folder in inno because it at least tries to work with F1 there.  If I just hard code I can leave it there.
> >
> > the miscapi file that i am using is no longer in the duflp folder because it has to be added to the project and then go into the .exe file.  This just seems like an easier option for me since it has already been done and works!
>
> If it works then it is okay. No issues. But what will happen if you
> require runhidden() somewhere else also.
>
> The basic reason I stopped hard coding paths is that it takes hell a lot
> of time to alter these paths if I change directory at a later stage.
>
> Besides how do you hard code paths which I may distribute to some one
> else also. He may decide to install in a different directory and then
> either I change all the code or force him to change directories.
>
> Then the most important relative paths are easy to access over LAN.
>
> In cases where I have to hard code the paths I declare a memory variable
> at the start of the program assign values to it and then use that
> variable throughout. So just changing the value of the variable is
> sufficient to change paths in all the code.
>
> When stating paths over LAN I prefer to use UNC paths. They are much
> more stable than mapped drives.
>
> Regards
> Akshat