GoogleCodeArchive / piccolo2d

Automatically exported from code.google.com/p/piccolo2d
0 stars 0 forks source link

Component doesn't receive events after PSwing is added, removed and re-added to scenegraph #158

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

Use Piccolo2D 1.3 rc1. 
Run the attached example program, DebugAddPSwing.

What is the expected output? What do you see instead?

Behavior of the JTextField in the example should be the same after it's
removed and re-added to the scenegraph.  Instead, the behavior is
different.  After re-adding, it does not receive key events and therefore
appears to be broken.

Additional info:

This example works fine with our snapshot (rev 390, circa 9/9/2008).  I
suspect (but have not confirmed) that some crucial connection to Swing is
being disconnected when the Component is removed from the scenegraph. 

Original issue reported on code.google.com by cmal...@pixelzoom.com on 27 Jan 2010 at 8:36

Attachments:

GoogleCodeExporter commented 9 years ago
Fixed in r960. canvas field was not properly getting nulled out when node was 
removed 
from the scene. So that when it was re-attached, it falsely thought it had 
already been  
registered with the canvas.

Original comment by allain.lalonde on 27 Jan 2010 at 9:26

GoogleCodeExporter commented 9 years ago
This change doesn't fix the problem when applied to 1.3 rc1.  Are you testing 
with rc1?

I do support this change - it's a useful fix, because updateCanvas(null) would 
have
resulted in a NullPointerException.  But I don't see how it could fix the 
problem
reported.  So I think this issue needs to be reopened.

Original comment by cmal...@pixelzoom.com on 27 Jan 2010 at 10:38

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Doh! My bad. It was me that wasn't testing with rc1.  I applied the fix to rc1 
and it
works.  (Sorry about that.)  I've marked this as verified.

Original comment by cmal...@pixelzoom.com on 27 Jan 2010 at 10:51

GoogleCodeExporter commented 9 years ago
lol Thanks for that emotional roller coaster :)

Original comment by allain.lalonde on 28 Jan 2010 at 12:18