Tom Downey - 2007-08-24

Logged In: YES
user_id=1228280
Originator: YES

This gets caused by tieing to a VariableInput (also happens when you tie a VariableJSlider to a VariableInput). The problem is that with Swing, the VariableInput always fires a pair of events when setText is called. The sync code avoided problems in preSwing by calling justSetText, which didn't set the hasChanged variable. Unfortunately with Swing, the document change events cause this to be set, possibly causing several tie updates.

As a workaround, the code in VariableInput now tries to watch more carefully for the case where it is being asked to set itself to its current value, and not do a setText in that case. Needs more thought and testing, and also need to strip out the justSetText code, which is now confusing (as it doesn't work the way it looks like it should).