[plt-scheme] drag and drop in X

From: Johan Holmquist (holmisen at gmail.com)
Date: Thu Nov 23 13:52:39 EST 2006

Hi,

I have not been able to make drag and drop work in X.
I tried with the following code:

------
(define dod-canvas%
  (class canvas%
    (override on-drop-file)
    (define (on-drop-file path)
      (display "DOD"))
    (super-instantiate ())))

(define frame
  (instantiate frame% ("Hello")))

(define canvas
  (instantiate dod-canvas% (frame)))

(send canvas accept-drop-files #t)
(send frame show #t)
------

It should display "DOD" when a file is dropped on the window. Nothing
happens in Linux, but it does work as expected in Windows.

I have not tested the latest stable (360) yet (sorry).

/Johan


Posted on the users mailing list.