I am about to start constructing a UI that will be run with Player Pro. I have created the following notebook and marked it cells as initialization cells.
PlotUi[] :=
CreateDialog[{Manipulate[
Plot[Sin[a x], {x, -2 \[Pi], 2 \[Pi]}], {{a, 1}, -2, 2}]}];
PlotUi[]
When I select File | CDF Preview | Player Pro I get a Player Pro window that shows me the code. I have to actually execute the code to show the UI. How can I get the UI to auto-load from the initialization cells and hide (close?) the notebook when it is opened? Also, how would I close the notebook when the GUI is closed.
The UI will be a processing wizard and the users should not have to execute (or see) any Mathematica code.
Manipulate
. $\endgroup$CreateDialog
, which creates a dialog notebook, just make the dialog notebook the notebook that the user will open. The point is that the dialog itself is a notebook. You can have aDynamicModule
within which can have anInitialization :> ...
option for any setup. But the GUI (at least the part that shows first) doesn't need to be created by evaluating something. It's just saved in the notebook. $\endgroup$