CLIM mail archive
What does HANDLE-EVENT do?
Date: Sun, 29 May 94 17:38:35 EDT
From: Nichael Cramer <ncramer@BBN.COM>
>From: Jeff Morrill <jmorrill@BBN.COM>
> From: Nichael Cramer <ncramer@BBN.COM>
> Subject: What does HANDLE-EVENT do?
> I can't seem to get the method HANDLE-EVENT to be called....
> (clim:with-output-as-gadget (STREAM)
> (clim:make-pane 'my-gadget
> :client *MY-CLIENT*
> In point of fact, the only time the method seems to be called _anywhere_ on
> _anything_ is for a few POINTER-ENTER/EXIT-EVENTs on some viewports. [...]
>There is a file, custom-gadget.lisp, that I put some time ago on
>cambridge.apple.com. It contains a working push-button and a working
>slider. The test code displays them on an accept-values pane and they
>seem to work. The button is displayed using with-output-as-gadget.
>The slider is displayed by defining a "view" and invoking ACCEPT.
>Perhaps by comparing your code with that code, you may see the problem.
Thanks for pointing me in the right direction.
In case anyone else is interested, basically the problem was this:
I had (naively) assumed that I could use something resembling a standard
clim-pane to handle the events. I.e. rather than building my gadget on top
of, say, CLIM:APPLICATION-PANE, I find I have to build it on top of (using
Jeff's example) SILICA::LEAF-PANE and SILICA:SPACE-REQUIREMENT-MIXIN (with
a sprinkling of appropriate clim::GADGET-*-MIXINs).
What I presume was happening is that _something_ in the intervening layers
was snatching the pointer-click events before I could get to them.
Oh, right, of course. CLIM streams have a protocol (implemented
mostly by the RECEIVE-GESTURE g.f.) that serves to map the sequence of
raw events into CLIM's presentation-based gesture "language". This is
surely what was nailing you.
Sorry I didn't pick up on this immediately.
Main Index |