Project: Eclipse_Platform_UI
Bug 242017 [DataBinding] ButtonObservableValue does bot store the inital value during init causing the next change to be dropped
Reported: 2008-07-24 15:21:11 | Status: verified fixed

Build ID: 3.4.0 - I20080617-2000 Steps To Reproduce: 1. Create a Check Box button whose initial value is CHECKED 2. Create a Text Box 2. Create a binding with checkbox's selection as the model with Text Box's enablement as the target 3. Watch the enablement change by checking, unchecking the check box The text box's enablement does not change when the check box is unchecked first. More information: This is due to the fact that the ButtonObservableValue in its init method does not store the initial selection status pf the button. Therefore the first change, transition to unchecked stated is falsely equal with the *current* state of the writable value. Therefore change is dropped and further bindings processing is terminated. Initializing the default current state with: this.selectionValue = button.getSelection(); at the end of the init method fixes the problem. Regards, Hasan Ceylan

Files changed in fix:
bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/ButtonObservableValue.java