Community
Participate
Working Groups
The current means by which to specify that the TextObservableValue is to fire events early (on modify) is to retrieve the SWTObservableFactory, set the updateTime property, and then create the observable. The problem with this is that it is not very intuitive, can be problematic if it's a shared factory and the caller doesn't remember to reset the value, and most importantly it requires that the consumer has a reference to the SWTObservableFactory. This can be problematic anytime an abstraction for creating an observable is employed. The use case I'm running into this is a factory to create bindings for TableViewers. If the API for the factory is to accept a CellEditor and to then perform the binding at a later time the consumer has no way to specify that they want the observable to fire events early. Also if the factory only has a reference to a DBC and not to the SWTObservableFactory it will not have access to the SWTObservableFactory to set the value. This could be generalized into the problem of how to provide configuration to observable creation when using a DBC or any other abstraction.
Created attachment 45819 [details] patch Provides support for specifying the update time of Text at bind time and without knowledge of the factory. I deprecated the APIs on SWTObservableFactory that dealt with setting the updateTime directly. I'd prefer to remove these but I'm not sure what the repercussions would be of this.
Created attachment 45837 [details] patch Same as before but deprecated DataBindingContext.TIME_EARLY and DataBindingContext.TIME_LATE and removed all references to these values in the scenario tests.
Because of the latest refactoring and the creation of SWTObservables this bug is no longer valid. INVALID > 20060926.