PDA

View Full Version : [FIXED] [1.2.3 & 2.0 Trunk] setStatus() in StatusProxy (DND) broken



takayser
14 Apr 2009, 9:25 AM
The StatusProxy object cannot be changed from allowed to disallowed in the onDragEnter method.

Considering following code from DropTarget.class. Green marked the code where the status is set to true, blue marked the code where I can put my code (... setStatus(false)) and red marked the code where the status again is set to true and resets the code I set in the onDragEnter method (... .setStatus(false)).


boolean handleDragEnter(DNDEvent event) {
event.setCancelled(false);
event.getStatus().setStatus(true);
onDragEnter(event);
if (!fireEvent(Events.DragEnter, event)) {
event.getStatus().setStatus(false);
return false;
}

event.getStatus().setStatus(true);
if (overStyle != null) {
component.addStyleName(overStyle);
}
return true;
}

sven
14 Apr 2009, 10:50 AM
Fixed in SVN.