ramido / choosel

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

Closing View causes exception that prevents dnd operations #34

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create any view
2. Close it
3. Try to drag resources

What is the expected output? What do you see instead?
Normal dnd expected, but not working.

Original issue reported on code.google.com by Lars.Grammel on 27 Jul 2010 at 6:02

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Relevant part of stack trace:

java.lang.NullPointerException: null
    at org.thechiselgroup.choosel.client.ui.dnd.SelectionPresenterDropCommandFactory.canDrop(SelectionPresenterDropCommandFactory.java:87)
    at org.thechiselgroup.choosel.client.ui.dnd.ResourceSetAvatarDropController.canDrop(ResourceSetAvatarDropController.java:91)
    at org.thechiselgroup.choosel.client.ui.dnd.DefaultResourceSetAvatarDragController.canDropOn(DefaultResourceSetAvatarDragController.java:207)
    at org.thechiselgroup.choosel.client.ui.dnd.DefaultResourceSetAvatarDragController.getAvailableDropControllers(DefaultResourceSetAvatarDragController.java:276)
    at org.thechiselgroup.choosel.client.ui.dnd.DefaultResourceSetAvatarDragController.calculateTemporaryDropTargets(DefaultResourceSetAvatarDragController.java:198)
    at org.thechiselgroup.choosel.client.ui.dnd.DefaultResourceSetAvatarDragController.dragStart(DefaultResourceSetAvatarDragController.java:265)
    at ...

Original comment by Lars.Grammel on 27 Jul 2010 at 6:03

GoogleCodeExporter commented 9 years ago
Debugging revealed that the add selection avatar and its drop controller from 
the removed view are still present, although they should have been removed. 
Inspecting DefaultView showed that the corresponding presenter did not get 
disposed when the view gets disposed. 

I added a test case and fixed DefaultView.dispose().

I verified that this fixes the problem.

Original comment by Lars.Grammel on 27 Jul 2010 at 6:32