I am developing a .nb (further to be a CDF) where I am loading two packages. One package is taking numerical integral and the other is taking symbolic one. I would like to be able execute both packages with one button click. Here is the main file
Manipulate[
DynamicModule[{f = Sin[x], xR = 1, xL = 0,
Res = 0.4596976941318603`16, NRes = 0.4596976941318603`16},
Column[{Row[{"Lower Limit ", InputField[Dynamic[xL], Number]},
Spacer[5]],
Row[{"Upper Limit ", InputField[Dynamic[xR], Number]}, Spacer[5]],
Row[{"Function ", InputField[Dynamic[f]]}, Spacer[20]],
Button[Style["Calculate", Green, Bold],
Dynamic[Res = TFPackageSourceCodeNum`WD1Int[f, xR, xL, np, nw];]],
Button[Style["Calculate", Green, Bold],
Dynamic[NRes = TFPackageSourceCodeSym`ND1Int[f, xR, xL, nw];]],
Row[{"Result", InputField[Dynamic[Res], Enabled -> False]},
Spacer[51]],
Row[{"Symbolic", InputField[Dynamic[NRes], Enabled -> False]},
Spacer[35]],
Row[{"Difference",
InputField[Dynamic[NRes - Res], Enabled -> False]},
Spacer[20]],
}]], {{np, 16, "NumberFormat"},
ControlPlacement -> Bottom}, {{nw, 16, "WorkingPrecision"},
ControlPlacement -> Bottom},
Initialization :> (Get[
FileNameJoin[{NotebookDirectory[
EvaluationNotebook[]], {"TFPackageSourceCodeSym.wl",
"TFPackageSourceCodeNum.wl"}}]];)]
I grouped the functions under one button using { }
Button[Style["Calculate", Green,
Bold], {Dynamic[
Res = TFPackageSourceCodeNum`WD1Int[f, xR, xL, np, nw];],
Dynamic[NRes = TFPackageSourceCodeSym`ND1Int[f, xR, xL, nw];]}]
But it did not work. How I can do this ?