bug fixes from random testing

svn: r18602

original commit: fb37601b558516610d9e2058433aa43ebcfa62e5
This commit is contained in:
Matthew Flatt 2010-03-23 01:49:08 +00:00
parent 65aff3c205
commit 875244719b
6 changed files with 17 additions and 10 deletions

View File

@ -264,6 +264,7 @@ Matthew
unlocked)
(get-text [() (x) (x y) (x y z) (x y z p)] unlocked)
(get-flattened-text [()] unlocked)
(get-character [(start)] unlocked)
(find-wordbreak [(start end reason)] unlocked)
(save-file [() (filename) (filename format) (filename format show-errors?)] unlocked)
@ -273,7 +274,10 @@ Matthew
(num-scroll-lines [()] unlocked)
(find-scroll-line [(location)] unlocked)
(style-has-changed [(style)] unlocked)
(set-paragraph-margins [(para fl l r)] unlocked)
(set-paragraph-alignment [(para align)] unlocked)
(change-style [(x) (x y) (x y z) (x y z w)] unlocked)
(insert [(x) (x y) (x y z) (x y z p) (x y z p q)] unlocked)
(delete [() (start) (start end) (start end scroll-ok?)] unlocked)
@ -306,6 +310,7 @@ Matthew
write-lock)
(get-text [() (x) (x y) (x y z) (x y z p)] write-lock)
(get-flattened-text [()] write-lock)
(get-character [(start)] write-lock)
(find-wordbreak [(start end reason)] write-lock)
(save-file [() (filename) (filename format) (filename format show-errors?)] write-lock)
@ -321,6 +326,7 @@ Matthew
(not (locked-for-read?)))
(get-text [() (x) (x y) (x y z) (x y z p)] flow-lock)
(get-flattened-text [()] flow-lock)
(get-character [(start)] flow-lock)
(find-wordbreak [(start end reason)] flow-lock)
(save-file [() (filename) (filename format) (filename format show-errors?)] flow-lock)

View File

@ -170,14 +170,14 @@
(define sticky-styles? #t)
(define overwrite-mode? #f)
(def/public (set-styles-sticky [bool? s?]) (set! sticky-styles? s?))
(def/public (set-styles-sticky [bool? s?]) (set! sticky-styles? (and s? #t)))
(def/public (get-styles-sticky) sticky-styles?)
(def/public (get-overwrite-mode) overwrite-mode?)
(def/public (set-overwrite-mode [bool? v]) (set! overwrite-mode? v))
(def/public (set-overwrite-mode [bool? v]) (set! overwrite-mode? (and v #t)))
(def/public (get-sticky-styles) sticky-styles?)
(def/public (set-sticky-styles [bool? v]) (set! sticky-styles? v))
(def/public (set-sticky-styles [bool? v]) (set! sticky-styles? (and v #t)))
(define need-x-copy? #f)

View File

@ -43,7 +43,7 @@ All ASCII alpha-numeric characters are initialized with
}
@defmethod[(get-map [char char?])
(listof symbol?)]{
(listof (one-of/c 'caret 'line 'selection 'user1 'user2))]{
Gets the mapping value for @scheme[char]. See
@scheme[editor-wordbreak-map%] for more information.
@ -51,7 +51,7 @@ Gets the mapping value for @scheme[char]. See
}
@defmethod[(set-map [char char?]
[value (listof symbol?)])
[value (listof (one-of/c 'caret 'line 'selection 'user1 'user2))])
void?]{

View File

@ -154,7 +154,7 @@ used.}
@defmethod[#:mode override
(resize [w (and/c real? (not/c negative?))]
[h (and/c real? (not/c negative?))])
void?]{
boolean?]{
The bitmap will be cropped to fit in the given dimensions.

View File

@ -123,7 +123,7 @@ The @scheme[like-style] style must be in this style list, otherwise
}
@defmethod[(notify-on-change [f ((or/c (is-a?/c style<%> false/c)) . -> . any)])
@defmethod[(notify-on-change [f ((or/c (is-a?/c style<%>) #f) . -> . any)])
any/c]{
Attaches a callback to the style list. The callback is invoked

View File

@ -1020,10 +1020,11 @@ If the editor is displayed by multiple canvases and @scheme[all?] is
@defmethod[(get-wordbreak-map)
(is-a?/c editor-wordbreak-map%)]{
(or/c (is-a?/c editor-wordbreak-map%) #f)]{
Returns the wordbreaking map that is used by the standard wordbreaking
function. See @scheme[editor-wordbreak-map%] for more information.
function. See @method[text% set-wordbreak-map] and
@scheme[editor-wordbreak-map%] for more information.
}