I also use SaveDefinitions
to make manipulates self-contained. However, I have been bitten by a problem that took me some time to understand. SaveDefinitions
saves also the values of global variables that are needed, in my case kilobytes of raw data. When you display the Manipulate
output, the saved values will overwrite whatever newer values the global variables have at the time. This caused me inconsistencies and errors downstream. One workaround I have found is to erase the output, reload the data and regenerate the Manipulate
to update all saved values. Is there a better way?