| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
Rolf Howarth wrote:
|[H]ow do I stop dragging files onto myself?? If I initiate a drag
|inside my window but then cancel it by releasing the button without
|leaving the window I still receive an incoming drag as if I'd dragged
|the file in from the Finder!
I suspect by checking the source of the drag, and ignoring the drop if the source and targets are the same.
In this case your dropTarget's dragEnter() method shouldn't accept the drag
if dragSource == dropTarget. Now, I don9t think you can get at the
dragSource from the DropTargetDragEvent (the parameter to dragEnter()). But
you could use DragSourceListener to keep some state when it does dragging
and check this state in your component's dragEnter().
> 2. When receiving multiple files from the Finder I get ajava.util.List containing File objects. However, when I try to send
multiple files the same way it's ignored. I can only ever send a
single file, using a serialised java.io.File (as opposed to a
java.util.List) in my Transferable.
Any ideas? This is 1.3.1 under 10.2.2 by the way.
In all likeliness just a bug, and one that's not very likely to get fixed on
1.3.1. It would be worth trying if 1.4.1 will work for you - if not we'll
jump on it.
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.