[racket] Unexpected error extracting value from request bindings.

From: J G Cho (gcho at fundingmatters.com)
Date: Sun Jul 31 17:13:30 EDT 2011

I am a bit puzzled by this error:

The application raised an exception with the message:

extract-binding/single: 'q10493 not found in '((q10493 . "no"))

Symbol q10493 was generated by (gensym 'q) and used in

(list (radio-input (symbol->string nom) "yes")
                 (radio-input (symbol->string nom) "no")))

When I try to extract it

(define (extract-single nom)
  (λ (bindings)
    (extract-binding/single nom bindings)))

it complains....

So I changed to
(define (extract-single nom)
  (λ (bindings)
    (extract-binding/single (string->symbol (symbol->string nom))

And it seems to work but left me scratching my head.

Does anybody care to shed some light on this?


Posted on the users mailing list.