Bug introduced in V9 or earlier and fixed in V10

According to the documentation, Dynamic Details & Options section, especially:

For interactive mouse operations Dynamic[expr,{f_start, f, f_end}] typically evaluates f_start[val,expr] once when the mouse is pressed, then evaluates f[val,expr] whenever the mouse is moved, and then evaluates f_end[val,expr] once when the mouse is released.

I find the following behaviour a possible bug:

x = {.5, .5};
Graphics[{ Circle[],
           Locator[Dynamic[x, {Print[#] &, Automatic, None}]]

enter image description here

As you see f_start = Print[#]& is evaluated twice each time.

Is this a bug?

I've marked Bold the word typically in the quotation from documentation. Is this reffering to this case?

Here's the link to the question where Anon and I have faced this issue for the first time: Moving a locator based on the movement of another

  • 2
    $\begingroup$ If you put {Print["start"] &, Print["mid"] &, Print["end"] &} inside the Dynamic, you will see, that there is a mouse-moved event ("mid") registered between the two "start" events. I am still pondering on the significance of this detail... $\endgroup$ Sep 10 '13 at 14:13

Edit: fixed

Yes, it is a bug. I am quite confident it will be fixed in an upcoming release.

  • 8
    $\begingroup$ So you've faced it earlier and consulted with Wolfram? $\endgroup$
    – Kuba
    Sep 10 '13 at 21:19
  • 7
    $\begingroup$ I was considerably less confident than Rolf. Especially when I tried it in a development build, and it behaved worse. But then I fixed it. So I guess my confidence matches Rolf's, now. :) Beta testers should see this in the next beta build. $\endgroup$
    – John Fultz
    Sep 12 '13 at 6:39
  • 4
    $\begingroup$ John for president! $\endgroup$ Sep 12 '13 at 7:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.