I am trying to make a dialog with manipulate like this:
If[ DialogInput[
Column[{"Go on?",
ChoiceButtons[{DialogReturn[True], DialogReturn[False]}]}]] ==
True, DialogInput[{Row[{TextCell[
" Value of b "],
TextCell[" Value of c "]}],
Row[{InputField[Dynamic[b]], InputField[Dynamic[c]]}],
DefaultButton[DialogReturn[{}]]}];
text = Row[{The , values, of, "b", and, "c", are, now, ToString[b],
and, ToString[c]}, " "];
Manipulate[
Show[Plot[Sin[a*x + b] + c, {x, 0, 2 \[Pi]}],
PlotLabel -> Style[text, 15, Black]], {a, 1, 10}]]
But when I evaluate this code for the first time, in the second dialog box the values of b and c are always presented as “b” and “c”. For this first trial I would prefer to show them being 1 and 1 though. For the next trials the second dialog box should keep showing them to have the values of the last trial that was carrried out, exactly as is done when the above code is evaluated. How can I make this happen?
Another question concerns the possibility that after the above code has been evaluated, I would like a dialog box to appear that asks if a new trial is wanted. I have tried to get this done using the function While instead of If , but then I get in a loop where two dialog boxes alternate and the manipulation box with the sinus curve never shows up. I also tried Label and GoTo, but this does not seem to work either.