I’m facing a problem with exporting files using Button. This piece of simple code just creates some data, namely a list of Graphics that I want to export as an animated .gif.
foo = Graphics /@
Table[{GrayLevel[RandomReal[]], Disk[{i, j}, 0.5]},
{k, 50}, {i, 10}, {j, 10}];
Now exporting foo using Export["foo.gif", foo] works as expected (even though it takes quite a while to do so).
However, when I create a Button, e.g. using Button["Export!", Export["foo.gif", foo]], clicking the button causes Mathematica to freeze for some time. Afterwards, the evaluation seems to have stopped, but nothing was exported.
I want to use the button for exporting a similarly complex list of graphics in a Manipulate environment.
Thanks for your help!
1 Answer