Creating Clearer Method Names & Concepts
    Knut Arne Vedaa 
    knut.arne.vedaa at broadpark.no
       
    Fri Nov  2 15:46:47 PDT 2012
    
    
  
On 02.11.2012 22:24, Richard Bair wrote:>> Binding in JavaFX is 
certainly another source of confusion. You have "binding" and you have 
"Binding":
 >>
 >> A Property<T> has a method "bind", of which the doc says: "Create a 
unidirection binding for this Property."
 >>
 >> While there is also the interface Binding<T>, of which the doc says: 
"A Binding calculates a value that depends on one or more sources."
 >
 > I guess I didn't see these as different, as the "bind" method uses a 
Binding (or just listens to it if it is of the right type):
 >
 >      public void bind(final ObservableValue<? extends Number> 
rawObservable) {
 >          if (rawObservable == null) {
 >              throw new NullPointerException("Cannot bind to null");
 >          }
[more code]
 > So the "bind" method is just shorthand, really, for using Bindings on 
that property.
Interesting. This is not what the API user sees, though.
I'm still unclear about the semantics of it. What is a "binding" (in 
this context)?
Knut Arne
    
    
More information about the openjfx-dev
mailing list