threerings/tripleplay — Issue #1: NPE on Field
Author: tulsidas
Created: 2011-11-04 15:54:40+00:00
State: open

On the WidgetDemo if I click on the "Editable Text" field and delete all the text, it's layout loses verticallity, but I can start writing ok. But if I lose focus and then reclick on the field, I get this:

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at playn.core.Layer$Util.parentToLayer(Layer.java:278)
at tripleplay.ui.Field.onPointerEnd(Field.java:47)
at tripleplay.ui.Root.dispatchPointerEnd(Root.java:115)
at tripleplay.ui.Interface$1.onPointerEnd(Interface.java:62)
at playn.java.JavaPointer$2.mouseReleased(JavaPointer.java:73)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
at java.awt.Component.processMouseEvent(Component.java:6267)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6032)
at java.awt.Container.processEvent(Container.java:2041)
at java.awt.Component.dispatchEventImpl(Component.java:4630)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4460)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
at java.awt.Container.dispatchEventImpl(Container.java:2085)
at java.awt.Window.dispatchEventImpl(Window.java:2478)
at java.awt.Component.dispatchEvent(Component.java:4460)
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)