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


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

Stumped on debugging what is causing Dynamic to re-evaluate.

From W Craig Carter <ccarter@mit.edu>
Newsgroups comp.soft-sys.math.mathematica
Subject Stumped on debugging what is causing Dynamic to re-evaluate.
Date 2011-06-17 04:11 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <itek4n$s7r$1@smc.vnet.net> (permalink)

Show all headers | View raw


Hello Group,
I've been stumped on something for a few days.

The example is far too long to cut and paste---which is the preferred 
mode for asking questions in this group.  So, I am hoping only for 
advice on how to find what is causing unexpected re-firing of a Dynamic.

I have something of this form:
--------------
With[
{symbolsToBeUsedByKernel=constantThings},

DynamicModule[
{valuesSetByControlObjects,
a,
b,
c,...},
PopupMenu[Dynamic[a],"choice1","choice2"];
InputField[Dynamic[b]];

Dynamic@slowComputationGraphicsObject[symbolsToBeUsedByKernel,a,b]
]

]
----------------


In the actual example, I have many such Dynamic Control objects.

If I use a "dummy" =
slowComputationGraphicsObject[symbolsToBeUsedByKernel,a,b], there is no 
re-firing of Dynamic@slowComputationGraphicsObject.

If I use my "500-line---mutliple module---calls several packages---CPU 
intensive" ComputationGraphicsObject, an infinite loop of re-firing 
takes place (and the FrontEnd becomes unresponsive).

How does one start going about finding the cause of the re-firing????

I've buried all of the list-like controls in the 
With[{i=i},Table[InputField[var[[i]],{i,n}]] paradigm.
I've tried limiting the TrackedVariables.
I've tried Synchronous and ASynchronous updating.
None of these work.

I can solve the problem with a Button to fire the computation and taking 
away the Dynamic---but this isn't very satisfying.

Any general advice?

Thanks, Craig



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


Thread

Stumped on debugging what is causing Dynamic to re-evaluate. W Craig Carter <ccarter@mit.edu> - 2011-06-17 04:11 +0000
  Re: Stumped on debugging what is causing Dynamic to re-evaluate. David Bailey <dave@removedbailey.co.uk> - 2011-06-20 23:37 +0000

csiph-web