Community
Participate
Working Groups
While trying to dig through and understand the goings on of Data Binding I started commenting the code in TextObservableValue for my own benefit and figured I'd give it back in case it could be used. I made 2 small code changes. * I renamed the parameter and instance variable that were named "updatePolicy" to "updateEventType". The reason for this was that initially because of the name "updatePolicy" I had assumed that it was accepting either DataBindingContext.TIME_EARLY or DataBindingContext.TIME_LATE. The confusion came when the code was then treating it as an SWT event type. * Added checks to the constructor that validated the inputs mostly out of habit. Since I touched it by changing the parameter name I figured I should validate it as well. I'll attach the patch and a JUnit. All existing tests in TextControlScenario still pass.
Created attachment 37964 [details] TextObservableValue patch
Created attachment 37965 [details] JUnit
I have released the patch (with modifications to the copyright notice and some of the Javadoc, and changing the NPE to an IAE), and added the test to the suite. Thanks!
Verified by looking at the source for I20060807-2000.