Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: evaluation of a non-visible dynamic[]

  • To: mathgroup at smc.vnet.net
  • Subject: [mg113205] Re: evaluation of a non-visible dynamic[]
  • From: John Fultz <jfultz at wolfram.com>
  • Date: Mon, 18 Oct 2010 05:58:11 -0400 (EDT)
  • Reply-to: jfultz at wolfram.com

On Sat, 16 Oct 2010 13:11:16 -0400 (EDT), AlexG wrote:
> Does anybody know?
>
> I like the way dynamic works asynchronously with the rest of my code.
> The problem is, it only works when the output of the dynamic[]
> function call is visible on the screen. Is there some way I can
> programmatically tell dynamic when start and stop updating? If there
> is, I will be VERY happy!
>
> Much Appreciation,
> --Alex Gurfinkel

Some people have asked for Dynamics that don't require being displayed.
The problem with this is alluded to by your question...if such a
thing existed, then you would have to invent some form of lifetime
management...i.e., ways to start, stop, and kill it.  Otherwise, once
the Dynamic was evaluated, it would just sit there, soaking up resources
and potentially evaluating again and again, for as long as the kernel
is alive.

I don't have a precise answer for what you say you're looking for.  But
I'll discuss some conceptually similar things you may find interesting.

Dynamics can be stored in the front end options CellDynamicExpression,
NotebookDynamicExpression, and FrontEndDynamicExpression.  These Dynamics
are not displayed, but are updated when the cell/notebook/frontend to
which they are attached is displayed.  That is, there's no guarantee that
they will evaluate if, for example, the owning notebook is minimized or
is set to Visible->False.

In the soon-to-be-released version 8, which was publicly revealed
at Mathematica User's Conference last week, there is a feature called
ScheduledTasks which may be what you're looking for.  They're background
tasks which are run at intervals.  If you really need the dependency
mechanism, then that probably won't help you, but if you're just
looking for periodic background tasks, then you probably will find it
quite useful.

Sincerely,

John Fultz
jfultz at wolfram.com
User Interface Group
Wolfram Research, Inc.


  • Prev by Date: simplifying an expression using non-commutative algebra
  • Next by Date: Re: Mathematica and infinite series
  • Previous by thread: evaluation of a non-visible dynamic[]
  • Next by thread: Re: evaluation of a non-visible dynamic[]