Signal an error if image button coordinates cannot be translated into

numbers.
This commit is contained in:
interp 2003-05-23 08:05:03 +00:00
parent a81dfb6ab1
commit f3b7c3a396
1 changed files with 6 additions and 2 deletions

View File

@ -512,8 +512,12 @@
(define (image-button-transformer image-button bindings)
(let ((x (find-image-button-coordinate image-button bindings ".x"))
(y (find-image-button-coordinate image-button bindings ".y")))
(and x y (cons (string->number x)
(string->number y)))))
(let ((x-number (string->number x))
(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)
(let* ((name (input-field-name image-button)))