original commit: b0aad71852c22d87fd5a62fc9fb5633fe1182d1c
This commit is contained in:
Robby Findler 2000-04-04 22:05:14 +00:00
parent 545be9170d
commit c8c27f3ebc
2 changed files with 7 additions and 2 deletions

View File

@ -64,6 +64,7 @@
delay-action
local-busy-cursor
unsaved-warning
text-snip<%>
read-snips/chars-from-text
get-choice
open-input-buffer

View File

@ -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))