Hi PB Team,
a liitle trouble with some forum gurus inspired me for the following wishes:
http://www.purebasic.fr/english/viewtop ... 13&t=41477
1. rename GetCurrentDirectory() to GetWorkingDirectory()
2. rename SetCurrentDirectory() to SetWorkingDirectory()
3. add a procedure (or Macro) GetProgramDirectory() (GetPathPart(ProramFilename())
And also give a hint in the help for each command to the other command.
So it is more clear that there is a difference.
Bernd
To get the right directory
Re: To get the right directory
Or use a personal include file with your own macros, so that you can rename and combine the functions according to your own taste?
Changing the names of functions that has their roots back to the old DOS-days would break many programs that works today...
Not so funny...
Changing the names of functions that has their roots back to the old DOS-days would break many programs that works today...
Not so funny...
The best preparation for tomorrow is doing your best today.
Re: To get the right directory
Hi KJ67,
you did not understand the reason for my wishes.
I know now the difference, so this wishes are not for me.
But if someone is new to PB and maybe also to programming, she/he does not know the difference
and so she/he can not write the macros by self.
Maybe 1% of the programs using this procedure, so it is not a big deal to adjust this view programs.
When a new major release of PB is coming out you have to adjust more programs.
(Or did your 3.xx programs work without changes in 4.xx ?)
Bernd
you did not understand the reason for my wishes.
I know now the difference, so this wishes are not for me.
But if someone is new to PB and maybe also to programming, she/he does not know the difference
and so she/he can not write the macros by self.
Maybe 1% of the programs using this procedure, so it is not a big deal to adjust this view programs.
When a new major release of PB is coming out you have to adjust more programs.
(Or did your 3.xx programs work without changes in 4.xx ?)
Bernd
-
- Enthusiast
- Posts: 469
- Joined: Sun Mar 16, 2008 9:18 am
Re: To get the right directory
"Current" and "working" directories are NOT the same thing, as explained in the other thread. Also, renaming them to no longer match the Windows API equivalents is not a good idea.
Also, for the macro request, you've just shown with your example above how to do it, so why not just use that? You don't need the team to do it for you, you just did it! :roll:
Also, for the macro request, you've just shown with your example above how to do it, so why not just use that? You don't need the team to do it for you, you just did it! :roll:
Re: To get the right directory
Hi UserOfPure,
as i already wrote:
It is not for me. It is for new users.
And... think more global:
PB is not dedicated to windows.
Or should I say: hm, this function name is not corresponding to the linux API?
Bernd
as i already wrote:
It is not for me. It is for new users.
And... think more global:
PB is not dedicated to windows.
Or should I say: hm, this function name is not corresponding to the linux API?
Bernd
- Kaeru Gaman
- Addict
- Posts: 4826
- Joined: Sun Mar 19, 2006 1:57 pm
- Location: Germany
Re: To get the right directory
making some ProgramPath() Macro native is not a bad idea.
a lot of beginners and also advance people stumble when they first run into the issue with the current directory.
but the "CurrentDirectory" definitely is an essential term, it's how the API calls it and how it always was called since DOS times,
changing this would not only lead to more confusion, it would simply be wrong.
A hint in the help file that the current directory not necessarily is the exe folder would do it.
[edith]
... so what is the "current" dir called on linux?
a lot of beginners and also advance people stumble when they first run into the issue with the current directory.
but the "CurrentDirectory" definitely is an essential term, it's how the API calls it and how it always was called since DOS times,
changing this would not only lead to more confusion, it would simply be wrong.
A hint in the help file that the current directory not necessarily is the exe folder would do it.
[edith]
... so what is the "current" dir called on linux?
oh... and have a nice day.
Re: To get the right directory
Hi Kaeru,
I know that you know how it is called in linux. :roll:
For all others:
get current working directory
So still: from the linux side of life, I can request that the procedure has to be renamed in
(in words: Just a joke)
Bernd
I know that you know how it is called in linux. :roll:
For all others:
What means:get_cwd()
get current working directory
So still: from the linux side of life, I can request that the procedure has to be renamed in
Code: Select all
GetCurrentWorkingDirectory()

Bernd
-
- Enthusiast
- Posts: 469
- Joined: Sun Mar 16, 2008 9:18 am
Re: To get the right directory
infratec wrote:GetCurrentWorkingDirectory()
