Documentation here shows a nice example of interdependent Slider controls in Manipulate:
Manipulate[If[m > n, m = n];
Row[{"(", Column[{n, m}, Center], ") = ", Binomial[n, m]}], {n, 1,
10, 1}, {m, 1, n, 1}]
Now, I'd like the controls to be setters instead of Sliders. The first one goes without a hitch:
Manipulate[If[m > n, m = n];
Row[{"(", Column[{n, m}, Center], ") = ", Binomial[n, m]}], {n, 1,
10, 1, Setter}, {m, 1, n, 1}]
But the second one kills the expression, and the error-message tooltip is empty (no message in the gray box when I float over the pink death box)
Manipulate[If[m > n, m = n];
Row[{"(", Column[{n, m}, Center], ") = ", Binomial[n, m]}], {n, 1,
10, 1, Setter}, {m, 1, n, 1, Setter}]
I can work around by nesting the Manipulates, but this is super ugly:
Manipulate[
Manipulate[If[m > n, m = n];
Row[{"(", Column[{n, m}, Center], ") = ", Binomial[n, m]}], {m, 1,
n, 1, Setter}], {n, 1, 10, 1, Setter}]
EDIT:
Reversing the orders of the Setters, as hinted by the workaround, does not help:
Manipulate[If[m > n, m = n];
Row[{"(", Column[{n, m}, Center], ") = ", Binomial[n, m]}], {m, 1, n,
1, Setter}, {n, 1, 10, 1, Setter}]
Is this a known limitation (feature)? Documented somewhere? Bug? Or pilot error (i.e., I misunderstand)? Is there a better way than my workaround to get the effect I want?
Range specification in Range[1,n$$,1] does not have appropriate bounds. >>
. $\endgroup$