My example function
progressFunction[time_] :=
Module[{t},
Monitor[For[t = 0, t <= time, t++, Pause[1]],
ProgressIndicator[t, {0, time}]]]
does exactly what I intend when I call it directly:
progressFunction[5]
(displays progress bar increasing from 0% to 100% over 5 seconds).
But when this function is called from within Manipulate:
Manipulate[progressFunction[time], {time}]
the Monitor cell displays:
Interestingly, when I copy/paste the above text into a new cell, it displays correctly in the new cell.
Any idea what's going on and how to fix this? This is pretty annoying because my real Manipulate expression calls functions that take a long time to complete, so I have implemented Monitor on all of them, but they all become useless under Manipulate.