Comment 4 for bug 1262394

Revision history for this message
Fabrizio Borgia (fabrizio-borgia) wrote : Re: Java dragDrop not working

------- Libray issue: SOLVED.
I solved the console message, as you suggested, I installed Sikuli on a single directory.
Now all my Sikuli Projects aro pointing to it. Thanks!

------- Dragdrop issue: UNSOLVED.
Ok, something is wrong, definitely.
I tried both you code chunks, with no effects. The windows are correctly focused, the movement is correctly performed, but no effect is produced on the GUI (the Finder window, the BN window).

------- Further details - JAVA VERSION?
I remember that when I switched from Sikuli IDE to Netbeans, and I installed the JDK (because I didn't have it on my machine) all the drag n' drop functions stopped working, even in the Sikuli IDE.
I am sure of this, because i removed my java installation, and the drag n' drop returned just fine.
I was wondering, which java versione are you using? Here is mine.
       java version "1.7.0_45"
      Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
      Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)

------- Further details - REGION VS SCREEN?
Here comes the strangest part: if use this code, the drag n'drop works on the Finder, but not on BattleNations.

        App.focus("Finder");
        Region theWindow = App.focusedWindow();

        theWindow.click(theWindow.getCenter());
        theWindow.wait(1.0);

        theWindow.mouseDown(Button.LEFT);
        theWindow.wait(2.0);
        theWindow.hover(theWindow.getCenter().offset(0, -100));
        theWindow.mouseUp();