let MAKE-NUMBER-INPUT-FIELD accept a default value

This commit is contained in:
interp 2002-10-03 12:28:36 +00:00
parent 47424d504f
commit 29abe30461
2 changed files with 5 additions and 2 deletions

View File

@ -355,12 +355,15 @@
(lambda maybe-further-attributes
(let ((name (generate-input-field-name "number")))
(optionals maybe-further-attributes
((attributes XML-attribute?))
((default (lambda (a) (or (number? a)
(string-or-symbol? a))))
(attributes XML-attribute?))
(make-input-field
name
number-input-field-transformer
`(input (@ (type "text")
(name ,name)
(value ,default)
,(and attributes (cdr attributes))))))))))
(define (make-password-input-field . maybe-further-attributes)

View File

@ -36,7 +36,7 @@
(define (make-number-input-field/default default)
(if default
(make-number-input-field `(@ (value ,default)))
(make-number-input-field default)
(make-number-input-field)))
(define (show-page operator-pair number1 number2 . maybe-update-text)