Hi all,
I was wondering if anyone has encountered the following situation using "tk_getOpenFile" dialog box:
I have been using Prowish 8.0 with my application and I have used the following command to open files:
set file_selected [ file nativename [ tk_getOpenFile \
-title $win_title \
-filetypes $file_type ] ]
This command has made it possible to close my application and open it again, and then select a file while "remembering" the directory where I grabbed the last file from.
When I switched to ActiveTcl 8.4 I relaized I had to use the following command to "remember" the directory where my files were:
# remember the previously chosen directory
if {$file_selected != ""} {
set dir_selected [file dirname $file_selected]
} else {
set dir_selected [pwd]; # no directory in memory
}
set file_selected [ file nativename [ tk_getOpenFile \
-title $win_title \
-filetypes $file_type \
-initialdir $dir_selected ]]
This works for me as long as I don't close my application. When I close my application I have to search through my directories to find the directory with the files. This is very tedious especially when my files are located 5 to 6 subdirectories away.
Does anyone know why this is happening? Or why the directory is "remembered" in Prowish 8.0 versus ActiveTcl 8.4?
TIA
I was wondering if anyone has encountered the following situation using "tk_getOpenFile" dialog box:
I have been using Prowish 8.0 with my application and I have used the following command to open files:
set file_selected [ file nativename [ tk_getOpenFile \
-title $win_title \
-filetypes $file_type ] ]
This command has made it possible to close my application and open it again, and then select a file while "remembering" the directory where I grabbed the last file from.
When I switched to ActiveTcl 8.4 I relaized I had to use the following command to "remember" the directory where my files were:
# remember the previously chosen directory
if {$file_selected != ""} {
set dir_selected [file dirname $file_selected]
} else {
set dir_selected [pwd]; # no directory in memory
}
set file_selected [ file nativename [ tk_getOpenFile \
-title $win_title \
-filetypes $file_type \
-initialdir $dir_selected ]]
This works for me as long as I don't close my application. When I close my application I have to search through my directories to find the directory with the files. This is very tedious especially when my files are located 5 to 6 subdirectories away.
Does anyone know why this is happening? Or why the directory is "remembered" in Prowish 8.0 versus ActiveTcl 8.4?
TIA