Minor change in args of MAKE-INPUT-FIELD-SETTER!

This commit is contained in:
interp 2003-07-13 14:35:33 +00:00
parent 4caaa001c7
commit cad4fe21cf
1 changed files with 11 additions and 10 deletions

View File

@ -90,13 +90,12 @@
(with-real-input-field input-field
(selector real-input-field))))
(define (make-input-field-setter setter . maybe-reset?)
(let ((reset? (:optional maybe-reset? #f)))
(define (make-input-field-setter setter reset?)
(lambda (input-field value)
(with-real-input-field input-field
(if reset?
(set-real-input-field-html-tree! real-input-field #f))
(setter real-input-field value)))))
(setter real-input-field value))))
(define input-field-name (make-input-field-selector real-input-field-name))
(define input-field-type (make-input-field-selector real-input-field-type))
@ -120,9 +119,11 @@
(define input-field-multi?
(make-input-field-selector real-input-field-multi?))
(define set-input-field-attributes! (make-input-field-setter set-real-input-field-attributes! #t))
(define set-input-field-attributes!
(make-input-field-setter set-real-input-field-attributes! #t))
;; not exported:
(define set-input-field-html-tree! (make-input-field-setter set-real-input-field-html-tree!))
(define set-input-field-html-tree!
(make-input-field-setter set-real-input-field-html-tree! #f))
;; A touched input-field's html-tree will be recalculated if
;; neccessary.
@ -132,7 +133,7 @@
;; <input-field>: '(input-field . <real-input-field>)
;; <real-input-field>: #{Real-input-field "name"}
(define (raw-input-field-value input-field bindings)
(let ((real-input-field (cadr input-field)))
(with-real-input-field input-field
(cond
((real-input-field-multi? real-input-field)
((real-input-field-transformer real-input-field) input-field bindings))