Let's say I have a workflow that involves importing images and turning them into an animated gif.
Here's how I currently have it setup:
Import Images:
imports = {};
importimages[] := Module[{a},
a = SystemDialogInput["FileOpen"];
If[ListQ[a], Table[Import[a[[i]]], {i, 1, Length[a]}], Import[a]]]
imports = Flatten[Append[imports, importimages[]]]
Allow for selection and rearranging:
sels = Range[Length[imports]];
CheckboxBar[Dynamic[sels], Table[i -> imports[[i]], {i, 1, Length[imports]}]]
imgs = Dynamic[imports[[sels]]]
Set animation rate and preview:
Manipulate[
displayrate = 1/rate;
ListAnimate[Setting[imgs], AnimationRate -> rate, AnimationRunning -> False],
{{rate, 1}, 0, 10, 0.1, LocalizeVariables -> False}]
Export to gif:
Export["~//Desktop//test.gif", Setting[imgs], "DisplayDurations" -> displayrate]
(By the way, feel free to improve code.)
My question is, what is the best way I can smoothly and dynamically wrap this entire workflow into a graphical program where if I were to put a non-Mathematica user in front of it, he/she can easily work it?
This question mainly stems from my poor understanding of the dynamic constructs and roots in action-based programming. The gif routine is just an example for future implementations that involve concise sequential steps.


Table[Import[a[[i]]], {i, 1, Length[a]}]is better done asImport /@ a, for starters. – J. M.♦ Sep 29 '12 at 1:42