Minor change in args of MAKE-INPUT-FIELD-SETTER!
This commit is contained in:
parent
4caaa001c7
commit
cad4fe21cf
|
@ -90,13 +90,12 @@
|
||||||
(with-real-input-field input-field
|
(with-real-input-field input-field
|
||||||
(selector real-input-field))))
|
(selector real-input-field))))
|
||||||
|
|
||||||
(define (make-input-field-setter setter . maybe-reset?)
|
(define (make-input-field-setter setter reset?)
|
||||||
(let ((reset? (:optional maybe-reset? #f)))
|
(lambda (input-field value)
|
||||||
(lambda (input-field value)
|
(with-real-input-field input-field
|
||||||
(with-real-input-field input-field
|
(if reset?
|
||||||
(if reset?
|
(set-real-input-field-html-tree! real-input-field #f))
|
||||||
(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-name (make-input-field-selector real-input-field-name))
|
||||||
(define input-field-type (make-input-field-selector real-input-field-type))
|
(define input-field-type (make-input-field-selector real-input-field-type))
|
||||||
|
@ -120,9 +119,11 @@
|
||||||
(define input-field-multi?
|
(define input-field-multi?
|
||||||
(make-input-field-selector real-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:
|
;; 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
|
;; A touched input-field's html-tree will be recalculated if
|
||||||
;; neccessary.
|
;; neccessary.
|
||||||
|
@ -132,7 +133,7 @@
|
||||||
;; <input-field>: '(input-field . <real-input-field>)
|
;; <input-field>: '(input-field . <real-input-field>)
|
||||||
;; <real-input-field>: #{Real-input-field "name"}
|
;; <real-input-field>: #{Real-input-field "name"}
|
||||||
(define (raw-input-field-value input-field bindings)
|
(define (raw-input-field-value input-field bindings)
|
||||||
(let ((real-input-field (cadr input-field)))
|
(with-real-input-field input-field
|
||||||
(cond
|
(cond
|
||||||
((real-input-field-multi? real-input-field)
|
((real-input-field-multi? real-input-field)
|
||||||
((real-input-field-transformer real-input-field) input-field bindings))
|
((real-input-field-transformer real-input-field) input-field bindings))
|
||||||
|
|
Loading…
Reference in New Issue