Inspired by the "Using DynamicModule variables outside the DynamicModule", I'd like to have a hands-free approach to invoking a DynamicModule in a newly created Notebook.
One of the original answers was this:
DynamicModule[{x = True, nb = CreateDocument[{"hello"}]},
Checkbox[Dynamic[x, (x = #; SetOptions[nb, Visible -> #]) &]]]
Replacing "hello" with a random input cell, we have:
DynamicModule[{x = True, nb = CreateDocument[{Cell["7+12", "Input"]}]},
Checkbox[Dynamic[x, (x = #; SetOptions[nb, Visible -> #]) &]]]
So -- all I need to know how to do is evaluate that cell without having to click on it and press Shift-Enter. I'm a bit of a noob, but if I can evaluate that 12+7, I'm sure I can evaluate the same cell containing an invocation of a DynamicModule. Probably quite easy, I just don't know where to look. But someone does--is it you?
DynamicModule
, the more that your answer does not mention it either. $\endgroup$