Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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

share|improve this question
2  
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... –  István Zachar Sep 10 '13 at 14:13

1 Answer 1

up vote 8 down vote accepted

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

share|improve this answer
7  
So you've faced it earlier and consulted with Wolfram? –  Kuba Sep 10 '13 at 21:19
5  
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. –  John Fultz Sep 12 '13 at 6:39
2  
John for president! –  Rolf Mertig Sep 12 '13 at 7:29

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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