radio-box% initial selection and #f

Closes PR 11107
This commit is contained in:
Matthew Flatt 2011-01-08 08:52:42 -07:00
parent 9e9a3ef814
commit 8f6acf6aae

View File

@ -333,11 +333,12 @@
(lambda ()
(let ([cwho '(constructor radio-box)])
(check-container-ready cwho parent)
(unless (< selection (length choices))
(raise-mismatch-error (who->name cwho)
(format "initial selection is too large, given only ~a choices: "
(length choices))
selection))))
(when selection
(unless (< selection (length choices))
(raise-mismatch-error (who->name cwho)
(format "initial selection is too large, given only ~a choices: "
(length choices))
selection)))))
label parent callback #f)))
(when (or (not selection) (positive? selection))
(set-selection selection)))))