It seems that clickbacks are not working when a snip is displayed in 
DrRacket interaction window.

Here is a sample program:
#lang racket/gui

(define (show-dialog)
  (define f (new dialog% [label "Dialog"] [style '(close-button)]))
  (define m (new message% [label "Clicked"] [parent f]))
  (send f show #t))

(define f (new frame% [label "Test"] [width 300] [height 200]))
(define e (new text%))
(define c (new editor-canvas% [parent f] [editor e]))
(send f show #t)

(define t (new text%))
(send t insert "Click Me!")
(send t set-clickback
      0 (send t last-position)
      (lambda (t s e)
(define s (new editor-snip% [editor t]))

(send e insert s)

If you click on the Click Me text you will get the dialog displayed.
If I enter 's' (without the quotes) in DrRacket interaction window, I can 
see my snip displayed but clicking on it does nothing.

I looked at DrRacket code but did not find anything that makes me think it 
should not work except, maybe, for the fact that the snip is sent using the 
text:send-snip-to-port function which serializes the snip to the proper 
event space using text:make-snip-special.

Could someone enlighten me on why it is not working as I expect and how I 
could make this works ?

Thanks for your help

You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to