Lesson #1: InvalidDnDOperationException Ruins Sanity
A friend with whom I am currently working on a programming contract called me today to tell me that the latest build wasn’t working. At all.
This irritated and confused me, as I hadn’t worked on that particular project for a week or so, and couldn’t remember having any issues with it.
I booted into Windows (I use Linux mostly), downloaded Eclipse and imported the project.
Sure enough:
java.awt.dnd.InvalidDnDOperationException: Drag and drop in progress at sun.awt.dnd.SunDragSourceContextPeer.setDragDropInProgress(Unknown Source) at java.awt.dnd.DragSource.startDrag(Unknown Source)
This error had attacked me before, but a quick investigation revealed that the issue was different this time. Joyous news.
I poked about in the (too many) classes that make up this project, but discovered nothing of use.
After some fruitless Googling, it occurred to me that during the great Refactoring Storm of August, I may have changed some of the DragGestureRecognizers’ DnDConstants to ACTION_COPY instead of ACTION_COPY_OR_MOVE.
A short, smaller storm of refactoring esued, during which all ACTION_COPY_OR_MOVE DnDConstants were changed to ACTION_COPY.
Why was this an issue at all? I was using evt.acceptDrop(DnDConstants.ACTION_COPY_OR_MOVE); to accept the drops, which I guess I must have assumed would accept an ACTION_COPY drop. Seemed to in Ubuntu, anyway. Maybe the Windows JRE is more strict (re: mental)?
Why this issue hid itself until now, I don’t know. Perhaps Ubuntu just likes me more.
Lesson: test software on the target system BEFORE giving it to your team-members.
Like this post? Move it on along with:
Email |
delicious |
Digg |
Tweet |
Reddit |
Newsvine |
Furl |
Google |
Stumble |
HaoHao
| Trackback: |
Related posts:
- Drag and Drop Reordering of NSTableView’s Rows Scroll to comments I just had to re-implement drag-and-drop-reordering of Slider cells. I was lucky enough to find my post on the Cocoa-dev list – I just had to copy-paste the code. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28...
- Installing JDownloader in Ubuntu Scroll to comments JDownloader is an excellent download manager. When I had a Mac I used Speed Downloader, but when the free trial period ran out I switched back to DownThemAll, a download manager plugin for Firefox. The only thing I missed about Speed Downloader was its ability to store my Rapidshare Password: a [...]...
- Oops… So I installed a plugin, ported my project over into the new plugin, and *bang* it stopped working....
- Write Your Own Listener Interface (you know you want to) This tutorial was all I needed to quickly implement my listener: Listeners in Java It's clear, succinct and comprehensive. When you need to implement your custom listener interface, check it out. ...
- Quaqua, OS X Application Bundle – Maven – Netbeans 6.1 Scroll to comments To skip the introduction and scroll straight to the tutorial, click here. [Edit 2009: turns out I couldn't use Java for this program, it's on hold for now. I'll have to rewrite what I've done in ObjC so I can use Apple's libraries. Tutorial below still valid, however.] I’m currently developing a program [...]...





























Recent Comments
The Best Photographer In Shanghai
When do we get to see them!!!!!
Tue, 12 Jan 2010 19:08:51 +0000
Installing Jdownloader In Ubuntu
Thank You!!!!
It works like a charm!!!!!!!!!!!!
Tue, 05 Jan 2010 13:02:35 +0000
Arrived In Shanghai
Done, look left!
Sun, 03 Jan 2010 15:37:03 +0000
Arrived In Shanghai
Hi :)
I'll see what I can do!
Sun, 03 Jan 2010 14:23:07 +0000
Arrived In Shanghai
Hi Mike. It would be very useful to have the time date and weather conditions in Shanghai, on your site. Be seeing you soon. Love NZMum.
Sat, 02 Jan 2010 23:30:41 +0000
Js Kit Comments Correct Usage Of The Permalink And Path Attributes
I think it could be better
Thu, 31 Dec 2009 09:01:44 +0000