svn: r15682
This commit is contained in:
parent
015e926c04
commit
60c0d623ee
|
@ -1,6 +1,5 @@
|
||||||
#lang scheme/base
|
#lang scheme/base
|
||||||
(require scheme/gui/base
|
(require scheme/class)
|
||||||
scheme/class)
|
|
||||||
|
|
||||||
;; --------------------------------------------------------------------------
|
;; --------------------------------------------------------------------------
|
||||||
(provide check-arg check-arity check-proc check-result
|
(provide check-arg check-arity check-proc check-result
|
||||||
|
@ -65,11 +64,16 @@
|
||||||
;; check-color : symbol (or/c str non-negative-integer) TST -> void
|
;; check-color : symbol (or/c str non-negative-integer) TST -> void
|
||||||
(define (check-color pname arg-pos given)
|
(define (check-color pname arg-pos given)
|
||||||
(check-arg pname
|
(check-arg pname
|
||||||
(or (is-a? given color%)
|
(or (string? given)
|
||||||
(string? given)
|
|
||||||
(symbol? given))
|
(symbol? given))
|
||||||
'color
|
'color
|
||||||
arg-pos given)
|
arg-pos given)
|
||||||
|
;; this would be good to check, but it isn't possible, since this
|
||||||
|
;; file is not allowed to rely on mred.
|
||||||
|
;; also nice would be to allow color% objects here, but that's
|
||||||
|
;; not possible for the same reason (but that is why
|
||||||
|
;; the '[else color]' case is below in the cond.
|
||||||
|
#;
|
||||||
(let ([color
|
(let ([color
|
||||||
(cond
|
(cond
|
||||||
[(symbol? given)
|
[(symbol? given)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user