diff --git a/collects/macro-debugger/util/notify.ss b/collects/macro-debugger/util/notify.ss index 33267dd8..8da4293f 100644 --- a/collects/macro-debugger/util/notify.ss +++ b/collects/macro-debugger/util/notify.ss @@ -3,6 +3,7 @@ (require (for-syntax scheme/base) scheme/list scheme/class + macro-debugger/util/class-iop scheme/gui) (provide define/listen field/notify @@ -15,7 +16,9 @@ menu-option/notify-box menu-group/notify-box check-box/notify-box - choice/notify-box) + choice/notify-box + + methods:notify) (define-for-syntax (join . args) (define (->string x) @@ -71,6 +74,19 @@ (define/public-final (listen-name listener) (send name listen listener))))])) + +(define-interface-expander methods:notify + (lambda (stx) + (syntax-case stx () + [(_ name ...) + (apply append + (for/list ([name (syntax->list #'(name ...))]) + (list ;; (join "init-" #'name) + (join "get-" name) + (join "set-" name) + (join "listen-" name))))]))) + + (define-syntax (connect-to-pref stx) (syntax-case stx () [(connect-to-pref name pref)