The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Inactive » comp.soft-sys.math.mathematica

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: DynamicModule Problem
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
David Park

Posts: 1,560
Registered: 5/19/07
DynamicModule Problem
Posted: Jul 18, 2013 2:42 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.