original commit: 313932ace72e315be7b281332a69cbdf2cb66ca4
This commit is contained in:
Matthew Flatt 2002-06-07 03:31:42 +00:00
parent c7ec7dd2b9
commit bc0427054b

View File

@ -0,0 +1,16 @@
(module sendevent mzscheme
(require "etc.ss")
(provide send-event)
(define send-event
(opt-lambda (who class msg [data (void)] [args null])
(let ([send-event (with-handlers ([not-break-exn? (lambda (x) #f)])
(dynamic-require '(lib "mred.ss" "mred")
'send-event))])
(if send-event
(send-event who class msg data args)
(raise
(make-exn:misc:unsupported
"send-event: only supported in MrEd"
(current-continuation-marks))))))))