fix error check on the result of place-children
The main problem is that it asked exact? on an unknown value and exact? works only on numbers. But since I was here, also try to clarify the error message a bit.
This commit is contained in:
parent
52d0b7e352
commit
ad2e8ac54e
|
@ -468,14 +468,20 @@
|
|||
(if hidden-child
|
||||
(- height (child-info-y-min (car children-info))) ;; 2-pixel border here, too
|
||||
height))])
|
||||
(define expected-length (- (length children-info) (if hidden-child 1 0)))
|
||||
(unless (and (list? l)
|
||||
(= (length l) (- (length children-info) (if hidden-child 1 0)))
|
||||
(= (length l) expected-length)
|
||||
(andmap (lambda (x) (and (list? x)
|
||||
(= 4 (length x))
|
||||
(andmap (lambda (x) (and (integer? x) (exact? x))) x)))
|
||||
(andmap exact-integer? x)))
|
||||
l))
|
||||
(raise-arguments-error 'container-redraw
|
||||
"result from place-children is not a list of 4-integer lists with the correct length"
|
||||
(raise-arguments-error
|
||||
'container-redraw
|
||||
(format
|
||||
(string-append
|
||||
"result from place-children is not a list of length ~a (matching the"
|
||||
" input list length) whose elements are lists of length 4 of exact integers")
|
||||
expected-length)
|
||||
"result" l))
|
||||
(panel-redraw children children-info (if hidden-child
|
||||
(cons (list 0 0 width height)
|
||||
|
|
Loading…
Reference in New Issue
Block a user