Date: Jul 18, 2013 2:42 AM
Author: David Park
Subject: DynamicModule Problem

I would like to have a DynamicModule (in a palette) with a Checkbox that
controlled a Global` variable and that would in turn indicate the state of
the Global variable if it was changed from within the notebook.

Actually, I can do that, but I would also like it to survive quitting and
restarting the Kernel - while leaving the notebook open. That I don't know
how to do. The actual problem is updating the DynamicModule variable from
the notebook. So here is a simple attempt where all I try to do is update
the DynamicModule display from the notebook.

systemState = False;

systemState = True;



Dynamic[Refresh[outsideState, TrackedSymbols -> {outsideState},

UpdateInterval -> 0.9]],

Initialization :> (outsideState := Global`systemState)


If I evaluate one of the systemState cells and then the DynamicModule to
create the dynamic display cell, I can flip the display back and forth by
subsequent evaluations of the systemState cells. If I Quit the kernel the
display changes to 'systemState'. If I then evaluate one of the systemState
cells, restarting the kernel, it behaves properly (for me) and I can again
flip the display.

But if I Quit and restart a second time it won't work. If I copy the dynamic
cell it works and if I close and reopen the notebook it works. But I don't
want to do those things and I don't know how to reliably recover from just
quitting and restarting the kernel.

David Park