removed bug in MAKE-YES-NO
This commit is contained in:
parent
d4ea641e14
commit
555af5225d
|
@ -32,9 +32,9 @@
|
|||
(lambda (exit)
|
||||
(map (lambda (query)
|
||||
(with-fatal-error-handler
|
||||
(lambda (c m)
|
||||
(lambda (c m)
|
||||
(exit
|
||||
(get-results queries title
|
||||
(get-results queries title
|
||||
(ask query 'bad-input-text))))
|
||||
(ask query 'value bindings)))
|
||||
queries)))))
|
||||
|
@ -107,9 +107,11 @@
|
|||
(else
|
||||
(get-method standard message))))))
|
||||
|
||||
(define (make-radio text choices)
|
||||
(let* ((radios (make-radio-input-fields choices))
|
||||
(standard (standard-query text (car radios) "Please respond")))
|
||||
(define (make-radio text choices . maybe-insist)
|
||||
(let* ((insist (:optional maybe-insist ""))
|
||||
(radios (make-radio-input-fields choices))
|
||||
(standard (standard-query text (car radios)
|
||||
(string-append "Please respond" insist))))
|
||||
(lambda (message)
|
||||
(case message
|
||||
((html-table-row)
|
||||
|
@ -124,15 +126,9 @@
|
|||
(get-method standard message))))))
|
||||
|
||||
(define (make-yes-no text yes-text no-text)
|
||||
(let ((radio (make-radio text (list yes-text no-text))))
|
||||
(lambda (message)
|
||||
(case message
|
||||
((bad-input-text)
|
||||
(format #f "Please respond with ~s or ~s"
|
||||
yes-text no-text))
|
||||
(else
|
||||
(get-method radio message))))))
|
||||
|
||||
(make-radio text
|
||||
(list yes-text no-text)
|
||||
(format #f " with ~s or ~s" yes-text no-text)))
|
||||
|
||||
(define (transform-string-to-query query)
|
||||
(if (string? query)
|
||||
|
|
Loading…
Reference in New Issue