Background: In a module containing an outer / inner manipulate I select the key of data with a dropdownlist in the outer manipulate. Data is read and displayed in the inner manipulate for edit purposes. The outer manipulate contains buttons, one of which is a save button. I want to get the edited data back at that level so that it can be saved.
Consider the following simplified example:
Manipulate[
Column[{j,
Manipulate[k, {k, 1, 5, 1}],
Button["Check", Print[k]]
}],
{j, 1, 10, 1}]
the question then becomes: "What is the best way to get the variable k scoped to the first / outer manipulate" ?
DynamicModuleon the outside of the outerManipulate? – Heike Apr 18 '12 at 16:22Manipulaterecomputes its body. This is the same logic as when we use externalModuleto create persistent local variables, as for example I discussed here. – Leonid Shifrin Apr 18 '12 at 17:02