Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #6797

Re: What is the point of having Initializations in DynamicModule and Manipulate?

From Chris Degnen <degnen@cwgsy.net>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: What is the point of having Initializations in DynamicModule and Manipulate?
Date 2011-11-29 12:03 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jb2hn0$58s$1@smc.vnet.net> (permalink)
References <jad5q6$eh2$1@smc.vnet.net>

Show all headers | View raw


The following is somewhat tangential to the initial question:

John Fultz wrote:
>
> Question...what do I do if I want thing A to evaluate before
> thing B?  Why, of course, use any number of Mathematica
> paradigms for sequential evaluation. The semicolon, representing
> CompoundExpression, for example.  No need to invent anything here.
>
> Further question...what if I want thing A to evaluate before
> thing B, but thing B is part of a dynamic interface.  This is
> the interesting question.  There are absolutely no guarantees
> about the order in which two discrete Dynamics will evaluate,
> so I can't set up multiple Dynamics in a row to evaluate in
> sequence.  I could nest Dynamics (outer ones always evaluate
> before inner ones), but then I may have to play some tricky
> games with Refresh to prevent code from evaluating which
> should only ever evaluate once.


Sal Mangano wrote about this issue in The Mathematica Cookbook,
starting at page 613:

"as explained by Theodore Gray ... using DynamicWrapper will
always guarantee that the second argument of DynamicWrapper will
be computed before any dynamic expressions contained in the
first argument."

In effect it appears to be similar to nesting Dynamics, at least
in one respect; and is unlike Initialize in that the second argument
is dynamically updated.

An example is given:

http://demonstrations.wolfram.com/2DCellularAutomatonAnimations/

where nested DynamicWrappers are used.

Documentation for DynamicWrapper only appeared in version 8
although the functionality exists in versions 6 and 7.

Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Re: What is the point of having Initializations in DynamicModule and Manipulate? John Fultz <jfultz@wolfram.com> - 2011-11-21 09:31 +0000
  Re: What is the point of having Initializations in DynamicModule and Manipulate? Chris Degnen <degnen@cwgsy.net> - 2011-11-29 12:03 +0000

csiph-web