1. Setting the default directory in win32lib's getSaveFileName()
- Posted by AJ_Oxley Mar 20, 2012
- 1209 views
Hello!
When opening the getSaveFileName, the default directory seems to be the last place the user saved a file,
whether from inside my program or not.
I need it to default to a specific directory; I tried to set this via setCurrentDirectory and setSearchPaths
before calling getSaveFileName, but no luck. The set's work, but getSaveFileName is not using that.
Other than getting my user to change the path, any suggestions? My user will just hit the button and it would be wrong!
My euphoria is v4.0.3 and OS is Windows XP SP3; win32lib is v070.18
Thanks, Alan
2. Re: Setting the default directory in win32lib's getSaveFileName()
- Posted by AJ_Oxley Mar 20, 2012
- 1240 views
I forgot to mention, in case it has a bearing,
that I am running the EUI interpreter and the eu.cfg has its first file as the same path as
the default getSaveFileName is getting.
I cannot have my user alter the eu.cfg, thats even less likely to happen than altering the path in the dialog :)
3. Re: Setting the default directory in win32lib's getSaveFileName()
- Posted by ghaberek (admin) Mar 20, 2012
- 1206 views
Just pass the value of current_dir() into the "filename" parameter.
I don't have it in front of me, but I'm pretty sure that works.
-Greg
4. Re: Setting the default directory in win32lib's getSaveFileName()
- Posted by AJ_Oxley Mar 21, 2012
- 1154 views
(Slap forehead) Indeed it does!
Thanks Greg.
Sorry, I sometimes hunt for the obscure instead of the obvious. Character defect perhaps ;)