Mathematica Asked on July 20, 2021
I am trying to create a setup where I have a number of InputField
, SetterBar
, and Checkbox
with Dynamic
in the first cell of my notebook where I can set some options/values, and then have a Button
which executes the initialization cells once these parameters have been chosen.
I was trying to understand how to use FrontEndTokenExecute["EvaluateInitialization"]
, but when I put this in a cell and run it, I get the following output and the evaluation cells don’t get executed, let alone when I put it inside of a Button
(in which case nothing happens at all):
RefLink[TextCell[ RawBoxes["FrontEndToken"]], paclet : ref/FrontEndToken]["EvaluateInitialization"]
Problem solved: I had copied and pasted the FrontEndTokenExecute
out of the Mathematica documentation window and it copied as a hyperlink, thus the RefLink
. Replacing it with plain text fixed it and the button works as expected.
Try this:
Button[Style["Before reading this notebook, press me", Bold,
Darker@Red],
FrontEndExecute[FrontEndToken["EvaluateInitialization"]]]
Correct answer by Alexei Boulbitch on July 20, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP