From: David Z. <kr...@kr...> - 2008-03-25 20:12:35
|
Le 25 mars 08 à 20:59, Joey Mukherjee a écrit : > Here is my code that I use in my program: > > set filetypes { { "Bundle Files" > *.buz } { "All Files" * } } > if [info exists $initialdir] { > set filenames [tk_getOpenFile -multiple 1 -filetypes > $filetypes -initialdir [subst $[subst $initialdir]]] > } else { > set filenames [tk_getOpenFile -multiple 1 -filetypes > $filetypes] > } > > Hopefully the formatting will be okay. > > I'm not sure which one the user is in to cause the crash. Can you > try it with an initialdir of something valid, then invalid, and then > without the initialdir argument? I'm not exactly sure what the subst > is doing in this code... If you replace -initialdir [subst $[subst $initialdir]] by -initialdir $initialdir it should works. Anyway, even with this, it shouldn't crash but just raise an error like this: bad directory "$/Users/kroc" -- David Zolli kr...@kr... http://www.kroc.tk |