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 evaluatesf_start[val,expr]
once when the mouse is pressed, then evaluatesf[val,expr]
whenever the mouse is moved, and then evaluatesf_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}]]
}]
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
{Print["start"] &, Print["mid"] &, Print["end"] &}
inside theDynamic
, 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$