Tell me more ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I am trying to create a button that uses SystemDialogInput["FileOpen"] to browse for a file and assigns the file name to a variable.

For example:

 {Button["Select the file", fname = SystemDialogInput["FileOpen"]], Dynamic[fname]}

This works most of the time; however, when the file that I browse to is several nested folders away from the default directory, it does not update the value of fname.

Is there some way around this? Or is there a better function to use? I eventually would like to use this button within Manipulate.

share|improve this question
2  
Try adding the option Method->"Queued" to your Button. – kguler Feb 22 at 4:23
2  

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.