Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6529873
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T09:41:18+00:00 2026-05-25T09:41:18+00:00

I gave up on this one. May be someone can see something obvious. I

  • 0

I gave up on this one. May be someone can see something obvious.

I have a trigger which updates variable ‘time’ when clicked on.

Next, I set TrackedSymbols->{time}, expecting the expression of the Manipulate to be re-evaluated only ‘time’ changes.

But I find that by changing another variable, which is NOT in the TrackedSymbols list, the expression is also being updated.

Here is an example

Manipulate[
 (
  If[time == 0, n = 0];
  Print[DateString[]];
  n
  ),
 {{time, 0, "run"}, 0, 20, AnimationRate -> 1, ControlType -> Trigger},
 {{n, 0}, None},

 TrackedSymbols -> {time}
 ]

The above works AS EXPECTED. when I click the run, click Pause, then click reset, all works ok, expression is only updated when trigger is ‘running’.

Now I add this one line, so the above becomes

Manipulate[
 (
  If[time == 0, n = 0];
  Print[DateString[]];

  n=n+1;     (* ADD THIS *)

  n
  ),
 {{time, 0, "run"}, 0, 20, AnimationRate -> 1, ControlType -> Trigger},
 {{n, 0}, None},

 TrackedSymbols -> {time}
 ]

Now, I do the same as before, click ‘run’, followed by pause then reset. Expected the expression NOT to update since the trigger is reset. i.e. the ‘time’ variable is not changing.

But after 3-4 seconds of hitting the reset, the expression starts to update by itself, with the right side of the cell showing it is busy, this is without me hitting the run button or touching anything. The magic of Dynamics at work 🙂

enter image description here

Next, I moved the variable ‘n’ down to the Initialization section, and now the problem went away:

Manipulate[
 (
  If[time == 0, n = 0];
  Print[DateString[]];
  n = n + 1;
  n
  ),
 {{time, 0, "run"}, 0, 20, AnimationRate -> 1, ControlType -> Trigger},

 TrackedSymbols -> {time},
 Initialization :>
  (
   n = 0;
   )
 ]

Now it will not update on its own as before.

My question is: Why when ‘n’ is written as {{n, 0}, None} there is the above problem with Manipulate? I always thought by using TrackedSymbols, only those symbols when changed value will Manipulate update the expression.

I am sure there is a simple reason for this, but after an hour on this, I can’t see it. Sometimes I think that I will never fully understand Mathematica Dynamic[].

Thanks for any explanation.

Update:

I think the problem is in the Trigger itself. I must be not understanding how Trigger works. Clicking ‘reset’ on the trigger does not seem to stop it from ticking? I am really confused now.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T09:41:18+00:00Added an answer on May 25, 2026 at 9:41 am

    Try TrackedSymbols :> {time}.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First of all I did gave a look at this one. But I didn't
Our professor gave us this assignment, where we have a .txt file with the
I desined a button in Blend, which gave me this xaml in after the
This code gave me 09:40 (I am in Turkey) but my time is now
This may look like the recent question that asked why Perl doesn't allow one-liners
In Jquery Template website they gave this example.( http://api.jquery.com/jQuery.template/ ) <script> var movies =
A friend gave me this code snippet in Clojure (defn sum [coll acc] (if
This supposedly easy task gave me some headache. I simply want to let the
In this question , Codygman gave an answer that some operators offer a way
This question is fairly fundamental.I gave a simple and straighfoward test on my cygwin:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.