I've tried to write dropAccept() (implementing DropTargetListener) and I
can't get it to work.
Naively I assumed that in dropAccept() the event.data field would be
populated. So I wrote:
dropAccept(DropTargetEvent event) {
if (false == (event.data instanceof FooBar)) {
event.detail = DND.DROP_NONE;
}
}
The problem is that event.data is null - so I would never accept any drops.
I had a look at the event.currentDataType in the debugger and I'm just
confused.
So how do implement dropAccept so that can reject any drops that aren't
going to be of type foobar.