I am encountering a problem using SystemDialogInput
within a Button
. The
code below shows what I am doing. To test this create a couple of files
"myfile.txt" and "myfile2.txt" etc.
DynamicModule[{path = $HomeDirectory},
Column[{
Button["Save",
path = SystemDialogInput["FileSave", "myfile.txt"];
Print[FullForm@path],
BaseStyle -> {"GenericButton", 11, Bold},
ImageSize -> 120],
Dynamic[path]
}]
]
1: Press the "Save" button.
2a: Find e.g. "myfile.txt" and click on it;
or (next try)
2b: Type "myfile.txt" in the input field.
3: I then get the warning message asking me if I want to replace. I choose "Replace".
The problem is that the pathway 1->2a->3 seems to work ok, however 1->2b->3 seems to abort (no path returned). In other words when you type the file name of an exisitng file into the input field and try to save nothing happens.
I am using Mma 8.0.4 on OS X 10.6.8. WRI tech support say they cannot reproduce this.
Q1. Can anyone else reproduce this?
Q2. Can anyone suggest possible causes?
For those who post that it works for them can you give your system and version details. Thanks
Edit
I must be in need of a break because it does seem that the evaluation timeout is the cause so Method -> "Queued"
is needed. Rookie mistake!
Not sure now whether this question even needs to be here. Probably not.