From: Karsten Poeck/OuB/Zentrale/DeuBa

Subject: Antwort: Custom event handling of a widget

Date: 1997-1-6 3:26

As far as I remember you need to define the method for the pane of the widget 
not
to the widget. In the Allegro Examples is something for that.

I don't have access to ACL at the moment, so _I cannot give you any details.
I our mcl2alcnt portability package we have used that for the pictuer widget 
(*b-picture*)

Karsten

______________[Historie der Mitteilungen]______________


An:   Allegro-Cl @ cs.berkeley.EDU (mailing list Allergo) @ INTERNET
Kopie an:   
Von: wklee @ CS.Cornell.EDU (Wai-Kwong Sam LEE) @ INTERNET @ CSERVE @ DEUBAPUB
Datum: 26.12.96 18.49.20 EST

Betreff: Custom event handling of a widget

Mitteilung

Hello,

Does anyone know how to define the keyboard/mouse behavior of a widget, 
say, single-item-list? What I want to do is to add functions for mouse 
left single click, left double click and right single click.

It seems that my problem is similar to the one of Bruce Tobin.

I have tried to define a custome single-item-list class as follows, but 
to no avail:

(defclass tm-single-item-list (single-item-list) nil)

(defmethod event
   ((dialog-item tm-single-item-list)
    (event (eql mouse-left-double-click))
    (shift t) (data t) (time t))
   (print "Left button double clicked."))


Thanks a lot for your help.


- sam