javafx 1.2.0_b211 used with NetBeans 6.5.1
How to re-produce:
1. Launch below application in NetBeans
2. Input some chars, for example, "name" into the first TextBox
3. Press <TAB>, you will see exception
Note: a "with inverse" clause can avoid the exception, for example,
if the first TextBox is declared as ... text: bind inputString with inverse...
moving the focus from it to the second TextBox will not cause any
exception, but moving the focus from the second TextBox to the first
TextBox will still cause exception(before pressing <TAB>, type some
chars into the second TextBox)
Codes used to re-produce:
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.control.*;
/**
* @author Lianqi.Li
*/
var inputString: String = "";
var outputString: String = "";
Stage {
title: "Application title"
width: 400
height: 200
scene: Scene {
content: [
TextBox {
text: bind inputString
columns: 20
translateX: 10
translateY: 40
},
TextBox {
text: bind outputString
columns: 20
translateX: 10
translateY: 70
}
]
}
}
Exception:
Exception in trigger:
com.sun.javafx.runtime.AssignToBoundException: Cannot assign to bound variable
at com.sun.javafx.runtime.location.ObjectVariable.set(ObjectVariable.java:113)
at javafx.scene.control.TextInputControl.set$text(TextInputControl.fx:54)
at javafx.scene.control.TextBox.commit(TextBox.fx:465)
at com.sun.javafx.scene.control.caspian.TextBoxSkin$TextBoxBehavior.focusChanged(TextBoxSkin.fx:1027)
at com.sun.javafx.scene.control.caspian.TextBoxSkin$_SBECL.onChange(TextBoxSkin.fx:1016)
at com.sun.javafx.runtime.location.BooleanVariable.notifyListeners(BooleanVariable.java:146)
at com.sun.javafx.runtime.location.BooleanVariable.replaceValue(BooleanVariable.java:94)
at com.sun.javafx.runtime.location.AbstractBindingExpression.pushValue(AbstractBindingExpression.java:92)
at com.sun.javafx.runtime.location.BooleanVariable$1.compute(BooleanVariable.java:104)
at com.sun.javafx.runtime.location.AbstractVariable.update(AbstractVariable.java:128)
at com.sun.javafx.runtime.location.AbstractVariable.invalidate(AbstractVariable.java:142)
at com.sun.javafx.runtime.location.AbstractLocation$2.onAction(AbstractLocation.java:235)
at com.sun.javafx.runtime.location.AbstractLocation$2.onAction(AbstractLocation.java:229)
at com.sun.javafx.runtime.location.AbstractLocation.iterateChildren(AbstractLocation.java:182)
at com.sun.javafx.runtime.location.AbstractLocation.invalidateDependencies(AbstractLocation.java:255)
at com.sun.javafx.runtime.location.AbstractLocation.invalidate(AbstractLocation.java:109)
at com.sun.javafx.runtime.location.AbstractVariable.invalidate(AbstractVariable.java:140)
at com.sun.javafx.runtime.location.AbstractLocation$2.onAction(AbstractLocation.java:235)
at com.sun.javafx.runtime.location.AbstractLocation$2.onAction(AbstractLocation.java:229)
at com.sun.javafx.runtime.location.AbstractLocation.iterateChildren(AbstractLocation.java:182)
at com.sun.javafx.runtime.location.AbstractLocation.invalidateDependencies(AbstractLocation.java:255)
at com.sun.javafx.runtime.location.BooleanVariable.notifyListeners(BooleanVariable.java:140)
at com.sun.javafx.runtime.location.BooleanVariable.replaceValue(BooleanVariable.java:94)
at com.sun.javafx.runtime.location.BooleanVariable.setAsBoolean(BooleanVariable.java:113)
at javafx.scene.Node.set$focused(Node.fx:1835)
at javafx.scene.Scene$_SBECL.onChange(Scene.fx:700)
at com.sun.javafx.runtime.location.ObjectVariable.notifyListeners(ObjectVariable.java:142)
at com.sun.javafx.runtime.location.ObjectVariable.replaceValue(ObjectVariable.java:104)
at com.sun.javafx.runtime.location.ObjectVariable.set(ObjectVariable.java:115)
at javafx.scene.Scene$KeyHandler.set$javafx$scene$Scene$KeyHandler$focusOwner(Scene.fx:698)
at javafx.scene.Scene$KeyHandler.requestFocus(Scene.fx:822)
at javafx.scene.Scene$KeyHandler.transferFocus(Scene.fx:800)
at javafx.scene.Scene$KeyHandler.transferFocusForward(Scene.fx:804)
at javafx.scene.Scene$KeyHandler.process(Scene.fx:727)
at javafx.scene.Scene.impl_processKeyEvent(Scene.fx:397)
at javafx.scene.Scene$ScenePeerListener.keyEvent(Scene.fx:500)
at com.sun.javafx.tk.swing.SwingScene$SwingScenePanel.doKeyEvent(SwingScene.java:421)
at com.sun.javafx.tk.swing.SwingScene$SwingScenePanel.keyPressed(SwingScene.java:425)
at java.awt.Component.processKeyEvent(Component.java:6092)
at javax.swing.JComponent.processKeyEvent(JComponent.java:2799)
at java.awt.Component.processEvent(Component.java:5911)
at java.awt.Container.processEvent(Container.java:2023)
at java.awt.Component.dispatchEventImpl(Component.java:4501)
at java.awt.Container.dispatchEventImpl(Container.java:2081)
at java.awt.Component.dispatchEvent(Component.java:4331)
at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1848)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:704)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:969)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:841)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:668)
at java.awt.Component.dispatchEventImpl(Component.java:4373)
at java.awt.Container.dispatchEventImpl(Container.java:2081)
at java.awt.Window.dispatchEventImpl(Window.java:2458)
at java.awt.Component.dispatchEvent(Component.java:4331)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
How to re-produce:
1. Launch below application in NetBeans
2. Input some chars, for example, "name" into the first TextBox
3. Press <TAB>, you will see exception
Note: a "with inverse" clause can avoid the exception, for example,
if the first TextBox is declared as ... text: bind inputString with inverse...
moving the focus from it to the second TextBox will not cause any
exception, but moving the focus from the second TextBox to the first
TextBox will still cause exception(before pressing <TAB>, type some
chars into the second TextBox)
Codes used to re-produce:
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.control.*;
/**
* @author Lianqi.Li
*/
var inputString: String = "";
var outputString: String = "";
Stage {
title: "Application title"
width: 400
height: 200
scene: Scene {
content: [
TextBox {
text: bind inputString
columns: 20
translateX: 10
translateY: 40
},
TextBox {
text: bind outputString
columns: 20
translateX: 10
translateY: 70
}
]
}
}
Exception:
Exception in trigger:
com.sun.javafx.runtime.AssignToBoundException: Cannot assign to bound variable
at com.sun.javafx.runtime.location.ObjectVariable.set(ObjectVariable.java:113)
at javafx.scene.control.TextInputControl.set$text(TextInputControl.fx:54)
at javafx.scene.control.TextBox.commit(TextBox.fx:465)
at com.sun.javafx.scene.control.caspian.TextBoxSkin$TextBoxBehavior.focusChanged(TextBoxSkin.fx:1027)
at com.sun.javafx.scene.control.caspian.TextBoxSkin$_SBECL.onChange(TextBoxSkin.fx:1016)
at com.sun.javafx.runtime.location.BooleanVariable.notifyListeners(BooleanVariable.java:146)
at com.sun.javafx.runtime.location.BooleanVariable.replaceValue(BooleanVariable.java:94)
at com.sun.javafx.runtime.location.AbstractBindingExpression.pushValue(AbstractBindingExpression.java:92)
at com.sun.javafx.runtime.location.BooleanVariable$1.compute(BooleanVariable.java:104)
at com.sun.javafx.runtime.location.AbstractVariable.update(AbstractVariable.java:128)
at com.sun.javafx.runtime.location.AbstractVariable.invalidate(AbstractVariable.java:142)
at com.sun.javafx.runtime.location.AbstractLocation$2.onAction(AbstractLocation.java:235)
at com.sun.javafx.runtime.location.AbstractLocation$2.onAction(AbstractLocation.java:229)
at com.sun.javafx.runtime.location.AbstractLocation.iterateChildren(AbstractLocation.java:182)
at com.sun.javafx.runtime.location.AbstractLocation.invalidateDependencies(AbstractLocation.java:255)
at com.sun.javafx.runtime.location.AbstractLocation.invalidate(AbstractLocation.java:109)
at com.sun.javafx.runtime.location.AbstractVariable.invalidate(AbstractVariable.java:140)
at com.sun.javafx.runtime.location.AbstractLocation$2.onAction(AbstractLocation.java:235)
at com.sun.javafx.runtime.location.AbstractLocation$2.onAction(AbstractLocation.java:229)
at com.sun.javafx.runtime.location.AbstractLocation.iterateChildren(AbstractLocation.java:182)
at com.sun.javafx.runtime.location.AbstractLocation.invalidateDependencies(AbstractLocation.java:255)
at com.sun.javafx.runtime.location.BooleanVariable.notifyListeners(BooleanVariable.java:140)
at com.sun.javafx.runtime.location.BooleanVariable.replaceValue(BooleanVariable.java:94)
at com.sun.javafx.runtime.location.BooleanVariable.setAsBoolean(BooleanVariable.java:113)
at javafx.scene.Node.set$focused(Node.fx:1835)
at javafx.scene.Scene$_SBECL.onChange(Scene.fx:700)
at com.sun.javafx.runtime.location.ObjectVariable.notifyListeners(ObjectVariable.java:142)
at com.sun.javafx.runtime.location.ObjectVariable.replaceValue(ObjectVariable.java:104)
at com.sun.javafx.runtime.location.ObjectVariable.set(ObjectVariable.java:115)
at javafx.scene.Scene$KeyHandler.set$javafx$scene$Scene$KeyHandler$focusOwner(Scene.fx:698)
at javafx.scene.Scene$KeyHandler.requestFocus(Scene.fx:822)
at javafx.scene.Scene$KeyHandler.transferFocus(Scene.fx:800)
at javafx.scene.Scene$KeyHandler.transferFocusForward(Scene.fx:804)
at javafx.scene.Scene$KeyHandler.process(Scene.fx:727)
at javafx.scene.Scene.impl_processKeyEvent(Scene.fx:397)
at javafx.scene.Scene$ScenePeerListener.keyEvent(Scene.fx:500)
at com.sun.javafx.tk.swing.SwingScene$SwingScenePanel.doKeyEvent(SwingScene.java:421)
at com.sun.javafx.tk.swing.SwingScene$SwingScenePanel.keyPressed(SwingScene.java:425)
at java.awt.Component.processKeyEvent(Component.java:6092)
at javax.swing.JComponent.processKeyEvent(JComponent.java:2799)
at java.awt.Component.processEvent(Component.java:5911)
at java.awt.Container.processEvent(Container.java:2023)
at java.awt.Component.dispatchEventImpl(Component.java:4501)
at java.awt.Container.dispatchEventImpl(Container.java:2081)
at java.awt.Component.dispatchEvent(Component.java:4331)
at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1848)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:704)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:969)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:841)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:668)
at java.awt.Component.dispatchEventImpl(Component.java:4373)
at java.awt.Container.dispatchEventImpl(Container.java:2081)
at java.awt.Window.dispatchEventImpl(Window.java:2458)
at java.awt.Component.dispatchEvent(Component.java:4331)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
- relates to
-
JDK-8107326 Need API doc describing that "bind with inverse" is required for "text" variable of TextBox
- Closed