I would like to create a set of custom controls that call Manipulate[] and return the value(s) set during the Manipulate session.
I can easily make a version that uses something like:
MyControl[] := Manipulate[...{a, -10,10}, {b,-1,1}]
This works but variables a, b and any additional variables set by Manipulate are global.
Is it possible to do something like this (Return a Dataset with the selected values for a and b when a "Set" button is clicked and Return Null if "Forget" is clicked):
MyControl[]:= Module[ {a, b},
Manipulate[...{a, -10, 10}, {b, -1, 1},
Button["Set", Return[Dataset[Association @ {aValue->a, bValue->b}]]],
Button["Forget", Return[]]]]