[plt-scheme] Trouble with GUI
On 15 Oct 2004 at 8:49, Matthew Flatt wrote:
> At Fri, 15 Oct 2004 08:46:13 -0500, "Arctic Fidelity" wrote:
> > I think I have the ouput buffer okay, but what's getting me is
> > processing the keys. I understand how I would process the buttons,
> > but how would I capture the key events from anywhere but the
> > output field, and then according to what key was pressed, update
> > my disabled text-field appropriately.
> >
> > The plan I had was to create a procedure for the main window
> > which would take the input from the keys, and process it from there.
> > However, I cannot seem to figure out how to use "on-subwindow-
> > char" or how to change what happens with that, as the frame% has
> > nowhere that I can specify a callback procedure.
>
> I think you're on the right track with `on-subwindow-char'. You need to
> derive a subclass of frame% that overrides `on-subwindow-char'.
I was afraid you were going to say that, I was actually hoping there
was a way I could do that without having to override the defaults,
but I suppose that's just what happens. ;-)
Thanks,
- Aaron Hsu <af at aaronhsu.com>