diff --git a/collects/framework/frameworks.ss b/collects/framework/frameworks.ss index adf6f37b..406be1db 100644 --- a/collects/framework/frameworks.ss +++ b/collects/framework/frameworks.ss @@ -64,6 +64,7 @@ delay-action local-busy-cursor unsaved-warning + text-snip<%> read-snips/chars-from-text get-choice open-input-buffer diff --git a/collects/framework/guiutils.ss b/collects/framework/guiutils.ss index fc461e2d..09e1be12 100644 --- a/collects/framework/guiutils.ss +++ b/collects/framework/guiutils.ss @@ -185,6 +185,7 @@ (send dialog show #t) result)])) + (define text-snip<%> (interface () get-string)) (define read-snips/chars-from-text (letrec ([get-snips (lambda (text start end) @@ -210,8 +211,11 @@ [(null? snips) (set! get-next (lambda () eof)) eof] - [(is-a? (car snips) string-snip%) - (let ([str (send (car snips) get-text 0 (send (car snips) get-count))]) + [(or (is-a? (car snips) string-snip%) + (is-a? (car snips) text-snip<%>)) + (let ([str (if (is-a? (car snips) text-snip<%>) + (send (car snips) get-string) + (send (car snips) get-text 0 (send (car snips) get-count)))]) (let string-loop ([n 0]) (cond [(< n (string-length str))