[plt-scheme] event binding help
I have one of them thar graphical applications, and I am trying to
figure out how to "bind" events.
The hackneyed example is a line drawing routine.
The top level event handler sees a button press, knows that the line
drawing tool is active and starts the line drawing routine.
So now I would like the line drawing routine to handle button presses,
certain keystrokes, etc..., without having to have the "top level"
event loop process them first and hand them to the line drawing
routine.
I refer to this as "binding" because that's the method Tk uses, and
it's rather nice (and simple). Once the procedure is invoked it
simply binds the event of interest to local procedures and "voila",
everything is taken care of. When the routine is done, the procedures
are "unbound" and life goes on.
With the threading and namespace functionality of mzscheme this has
got to be a breeze but the mechanics of doing this evade me. In
particular it looks like new event-spaces have to be associated with a
new window, whereas in this simple example the same window is being
used.
A simple outline of the approach which would work best with mzscheme
would be most helpful.
Thank You
Brian