atom feed19 messages in net.java.dev.openjfx-compiler.devRe: Binding with inverse
FromSent OnAttachments
Brian GoetzMar 13, 2009 11:50 am 
Michael AzziMar 13, 2009 12:43 pm 
Brian GoetzMar 13, 2009 1:20 pm 
Michael AzziMar 13, 2009 1:42 pm 
Weiqi GaoMar 14, 2009 6:24 am 
Kim TopleyMar 14, 2009 7:40 am 
Robert FieldMar 15, 2009 12:53 pm 
Brian GoetzMar 16, 2009 11:18 am 
Brian GoetzMar 16, 2009 11:19 am 
Kim TopleyMar 16, 2009 12:21 pm 
Weiqi GaoMar 16, 2009 7:37 pm 
Brian GoetzMar 18, 2009 11:32 am 
Michael AzziMar 18, 2009 11:56 am 
Weiqi GaoMar 18, 2009 7:09 pm 
Brian GoetzMar 20, 2009 9:11 pm 
Brian GoetzMar 20, 2009 9:12 pm 
Brian GoetzMar 20, 2009 9:18 pm 
Weiqi GaoMay 3, 2009 7:31 pm 
Brian GoetzMay 3, 2009 7:52 pm 
Subject:Re: Binding with inverse
From:Brian Goetz (Bria@Sun.COM)
Date:Mar 16, 2009 11:19:49 am
List:net.java.dev.openjfx-compiler.dev

This is already logged as JFXC-707.

Kim Topley wrote:

This code gives what seemed to me to be a surprising result:

-------------------------------------------------------------- import javafx.scene.text.Text;

var t:Text; var content1 = bind t.content on replace { println("content1: {content1}") }; var content2 = bind t.content with inverse on replace { println("content2: {content2}") };

t = Text { content: "Hello, World" };

--------------------------------------------------------------

Here's what it prints with the JavaFX 1.1 compiler/runtime:

-------------------------------------------------------- content1: content2: null content1: Hello, World

-------------------------------------------------------- The first issue is that content2 is null at some point, but I'm pretty sure that's already covered and probably fixed already. What surprised me is that content1 and content2 wind up being different, even though they are both bound to the same value. The difference is that content2 is bound with inverse while content1 is not. The cause is clear from the generated Java file. Do you want an issue raised for this?