Page 1 of 1
Please make the "Current Directory" persistent per
Posted: Fri Feb 27, 2009 10:57 pm
by Kaeru Gaman
the "Current Directory" field in the Compiler Options is quite handy to help finding content in the same dir as the source, when you compile-run codes for little tests and other things.
but if you alter it once, it will be changed to that value for ALL sources, even for all new.
please make it persistant to each single source like the other compiler options.
Posted: Fri Feb 27, 2009 11:40 pm
by Mistrel
Isn't it already persistent?
Code: Select all
; CurrentDirectory = ..\SomeDirectory\
Posted: Fri Feb 27, 2009 11:59 pm
by Kaeru Gaman
was strange... was hard to revoke it...
1. opened a "New File", in that way that a path was entered in the options field.
seems to happen when the last file closed had a manually entered path.
2. run a simple testcode, like
3. switch to another tab with another code that is in another source dir.
4. run it
the path will be the one manually entered, not "empty"
leads to a "file not found" when trying to load ressources from the source dir
Posted: Sat Feb 28, 2009 12:34 am
by Kaeru Gaman
PS:
oh.. sorry...
perhaps it should be an error-report?
Posted: Sat Feb 28, 2009 12:58 am
by ts-soft
this is not a error, only a missing feature
if you don't set the currentdir, the currentdir is undefined
Posted: Sat Feb 28, 2009 1:05 am
by Kaeru Gaman
it is an error.
when I clear the field manually to have the source dir as current dir, safe the file, run the other code and then switch back, the field is not empty anymore.
I will post a recipe to perform the error later..
watching "xchange" atm...
Posted: Sat Feb 28, 2009 1:27 am
by ts-soft
> when I clear the field manually to have the source dir as current dir, safe the file
this safes the file in the directory, but doesn't set the currentdir for your application.
if i use your final and start it in a commandshell, it can't find any file in
application dir. so if freak set this for you, it's only for testing in IDE usefull,
but your application have to add:
Code: Select all
SetCurrentDirectory(GetPathPart(ProgramFilename()))
and your are on the sure side.
Posted: Sat Feb 28, 2009 1:29 am
by Kaeru Gaman

when I close all tabs and open a new one, there is a PATH in the CurrentDir field!
this is not a FEATURE!
... and now stop that, I'm really getting fucking angry right now!
Posted: Sat Feb 28, 2009 1:33 am
by ts-soft
Open Preferences/Editor/Defaults and empty the "Current directory:" line and Apply.
Should work.
Posted: Sat Feb 28, 2009 1:38 am
by Kaeru Gaman
ok, sorry.
yes, it was changed in the Defaults.
... I emptied the corresponding line in the Purebasic.prefs, now it works properly.