This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
JavaFX Composer FXJDI Build #49 (Jul 8, 2010 7:48:33 AM) Steps to reproduce: - Copy the code to the editor: ---------------------------- class A{var name:String } var a = A{name: "Hello!" }; var str = "Hello World!"; println(a); ---------------------------- - Set a breakpoint to the last line - Debug the project The Variables window shows A$name as attribute of 'a' variable: ------------------------ a + A$name ------------------------ Probably it should show just the attribute name.
I discussed this with guys from JavaFX and they decided to see it this way. It's somehow logical because you can have A$a and B$a in the same class (script) and developer can't resolve which variable a belongs to adequate class. I'm closing it as works for me.
Could you please give an example. For example this is not compiled: ------------- A.fx ---------- var name; public class A { var name; } -------------------------------- > A.fx:16: name is already defined in javafxapplication5.A And this should work as expected: -------------- Main.fx ----------------- class A { var name: String } class B { var name: String } var a = A { name: "A" }; var b = B { name: "B" }; --------------------------------------- ------------------------ a + name b + name ------------------------
in your second sample the value for 'name' should be <class name>$<varible name> so for a it should be A$name and for b B$name.
Here is the code in JavaFX: ----------- Main.fx --------------- class A { var name: String } class B { var name: String } function run() { var a = A { name: "A" }; var b = B { name: "B" }; println("Hello!"); // set a breakpoint } ---------------------------------- Let's compare it with the Java code: ------------ Main.java ---------------- class A{ public String name; } class B{ public String name; } public class Main { public static void main(String[] args) { A a = new A(); a.name = "A"; B b = new B(); b.name = "B"; System.out.println("Hello!"); // set a breakpoint } } ---------------------------------- The Java debugger shows (see the attached screenshot). ------------------------ a + name b + name ------------------------ I suppose the same should be for the JavaFX.
Created attachment 101226 [details] Java debugger screenshot
Closing all bugs filed against JavaFX 1.x as wontfix. We will support JavaFX 2.0 - please keep opened only bugs against the new release. Thanks.