From a02520d692030450b07b079a6a48c9aed4d7d2d2 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Wed, 3 Mar 2010 16:42:45 +0000 Subject: [PATCH] tightened up inserts contract svn: r18446 --- collects/scribblings/gui/text-class.scrbl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/collects/scribblings/gui/text-class.scrbl b/collects/scribblings/gui/text-class.scrbl index 2a774fc970..caa007f0dc 100644 --- a/collects/scribblings/gui/text-class.scrbl +++ b/collects/scribblings/gui/text-class.scrbl @@ -1048,7 +1048,8 @@ See also @method[text% caret-hidden?] and @method[editor<%> lock]. [end (or/c exact-nonnegative-integer? 'same) 'same] [scroll-ok? any/c #t]) void?] - [(insert [n exact-nonnegative-integer?] + [(insert [n (and/c exact-nonnegative-integer? + (<=/c (string-length str)))] [str string?] [start exact-nonnegative-integer?] [end (or/c exact-nonnegative-integer? 'same) 'same] @@ -1056,7 +1057,8 @@ See also @method[text% caret-hidden?] and @method[editor<%> lock]. void?] [(insert [str string?]) void?] - [(insert [n exact-nonnegative-integer?] + [(insert [n (and/c exact-nonnegative-integer? + (<=/c (string-length str)))] [str string?]) void?] [(insert [snip (is-a?/c snip%)]