Signal an error if image button coordinates cannot be translated into
numbers.
This commit is contained in:
parent
a81dfb6ab1
commit
f3b7c3a396
scheme/httpd/surflets
|
@ -512,8 +512,12 @@
|
||||||
(define (image-button-transformer image-button bindings)
|
(define (image-button-transformer image-button bindings)
|
||||||
(let ((x (find-image-button-coordinate image-button bindings ".x"))
|
(let ((x (find-image-button-coordinate image-button bindings ".x"))
|
||||||
(y (find-image-button-coordinate image-button bindings ".y")))
|
(y (find-image-button-coordinate image-button bindings ".y")))
|
||||||
(and x y (cons (string->number x)
|
(let ((x-number (string->number x))
|
||||||
(string->number y)))))
|
(y-number (string->number y)))
|
||||||
|
(and x y
|
||||||
|
(if (and x-number y-number)
|
||||||
|
(cons x-number y-number)
|
||||||
|
(error "Image button coordinates aren't numbers. " x y))))))
|
||||||
|
|
||||||
(define (find-image-button-coordinate image-button bindings suffix)
|
(define (find-image-button-coordinate image-button bindings suffix)
|
||||||
(let* ((name (input-field-name image-button)))
|
(let* ((name (input-field-name image-button)))
|
||||||
|
|
Loading…
Reference in New Issue