Hi, I'm quite new using Mathematica and my English is horrible ... but I hope that maybe someone can help me.
I've written the following code, and seems to work. But by changing the selection field, recognizes the change until a new run. How I could change my code for my result variable is updated to automatically enter a new team?
Any track will be appreciated, thanks
CreateWindow[DialogNotebook[{
TextCell["Enter the type of operation to be performed:"],
DynamicSetting[
PopupMenu[Dynamic[list],
{
"Sum", "Substraction", "Multiplication", "Division", "Powers",
"Roots"
}
]
],
TextCell["Enter the first operand: "],
DynamicSetting[InputField[Dynamic[num1], Expression]],
TextCell["Enter the second operand: "],
DynamicSetting[InputField[Dynamic[num2], Expression]],
(*Realiza la operación de acuerdop al campo de selección*)
If[list == "Sum", result = Dynamic[num1 + num2], Null];
If[list == "Substraction", result = Dynamic[num1 - num2], Null];
If[list == "Multiplication", result = Dynamic[num1*num2], Null];
If[list == "Division", result = Dynamic[num1/num2], Null];
If[list == "Powers", result = Dynamic[num1^num2], Null];
If[list == "Roots", result = Dynamic[num1^(1/num2)], Null];
TextCell["Its outcome is: "],
Dynamic[result],
ChoiceButtons[{DialogReturn[Dynamic[result]]}]
},
WindowTitle -> "Basic Operation"
],
WindowSize -> All
];