The following code (attach) works in nb, but doent work in the cdf preview. Why? Is it the MessageDialog?
Yes, I believe it is the MessageDialog. Here’s a version that should work, provided you have the latest version of CDF player:
Manipulate[
Column[{Labeled[
NumberLinePlot[{n}, PlotRange -> {{-6, 6}, {-1, 1}},
Ticks -> {{0}}], "x", Right],
Style[If[c, "Correcto", "Incorrecto", ""], "Subtitle"]}], {{n, -4,
""}, {-4, 3, 0, -2, 5}, Slider}, {{c, Null, ""},
Row[{Button["Positivo", c = Positive[n]],
Button["Negativo", c = Negative[n]],
Button["cero", c = n == 0]}] &}]
Thank You. I think the second parameter of the instruction
Dynamic [p1 (p1 = #; MiFp [#]) &]
is not working in CDF. It’s a shame, because it provides a good window for better programming. For my purposes Manipulate seems limited.
I’ll wait to see if this alleged error is corrected in the future. If so is the case.
I attach a new version without MessageDialog. Which of course does not work in CDF.
Best regards
Your original example depends on a user evaluating the code in the notebook, which they cannot do in CDF Player. So to remove this requirement, you would need/want to use DynamicModule. And note the use of SaveDefinitions in the attached.
Ian