Re: strange behavior in bind

From: Ben L. Di Vito <bld_at_air57.larc.nasa.gov>
Date: Tue, 9 Mar 1999 16:59:14 -0500 (EST)

Greetings,

I've recently started using STk. During some early experimentation,
I noticed some similarly strange behavior with bindings. I had tried
a binding of the form (lambda (xx yy) ... xx yy ...). To my surprise,
I found that when the mouse x position was, say, 123, the value for xx
was 123123.

I later noticed in the STk manual that the binding's lambda arguments
are supposed to be single-character variables to match the Tcl/Tk "%"
conventions. So there must be some kind of textual substitution going
on here rather than simple Scheme binding and evaluation. Is this the
right interpretation for what the underlying implementation is doing?
It sounds like it would explain my case and possibly this one:

  (define motion1
    (lambda (xc yc)
      (format #t "~A, ~A\n" xc yc)))

---
    Ben Di Vito                     b.l.divito_at_larc.nasa.gov
    1 South Wright Street, MS 130   http://shemesh.larc.nasa.gov/~bld
    NASA Langley Research Center    voice: +1-757-864-4883
    Hampton, VA 23681   USA         fax:   +1-757-864-4234
Received on Tue Mar 09 1999 - 22:56:54 CET

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST