I converted a .nb with the following content to a standalone CDF but I get an error that says: "An unknown box name (N) was sent as the BoxForm for the expression. Check the format rules for the expression.". What is causing this?
DrawOdds[outs_] := 46/outs - 1
MinImpliedOdds[bet_, pot_, remStack_, outs_] :=
Module[{immediateOdds, odds, impliedAmt, percPot, percStack},
immediateOdds = (pot + bet)/bet; odds = DrawOdds[outs];
impliedAmt = If[immediateOdds < odds, bet (odds - 1) - pot, 0];
percPot = impliedAmt/(pot + 2 bet);
percStack = impliedAmt/remStack; {impliedAmt, percPot, percStack}]
Needs["Units`"]
DynamicModule[{bet = 230, pot = 380, remStack = 870, outs = 9},
Deploy[Style[
Panel[Grid[
Transpose[{{Style["bet", Red], Style["pot", Red],
Style["smallest remaining stack", Red], Style["outs", Red],
"implied amount", "% pot",
"% remaining stack"}, {InputField[Dynamic[bet], Number],
InputField[Dynamic[pot], Number],
InputField[Dynamic[remStack], Number],
InputField[Dynamic[outs], Number],
InputField[
Dynamic[MinImpliedOdds[bet, pot, remStack, outs][[1]] // N],
Enabled -> False],
InputField[
Dynamic[MinImpliedOdds[bet, pot, remStack, outs][[2]] 100 //
N], Enabled -> False],
InputField[
Dynamic[MinImpliedOdds[bet, pot, remStack, outs][[3]] 100 //
N], Enabled -> False]}}], Alignment -> Right],
ImageMargins -> 10],
DefaultOptions -> {InputField -> {ContinuousAction -> True,
FieldSize -> {{5, 30}, {1, Infinity}}}}]]]
InputFields. These can't be used in CDF's. See this doc page. Specifically: "All interactive content must be generated with the Manipulate command and may only use mouse-driven elements, such as Slider, Locator, Checkbox, PopupMenu, etc." – Sjoerd C. de Vries Apr 26 '13 at 12:20