[comp.windows.x] Multi-click

fcolin@cenaath.cena.dgac.fr (Francois-Regis COLIN) (06/04/91)

I am using Motif 1.1 and I want to do different action on a button
depending on single click or double-click. I have try to put
the following translation table on this button:
<Btn1Down> : Arm() \n\
<Btn1Down>(2) : Activate()
but I cannot get this to work correctly:
 I make a single click the Arm callback is called
 but when I make a double click the Arm callback is called
 with the activate callbak .
 the doc says that the sorter sequence is not called if
 the events maps the longest sequence ?
 is this normal or a bug in the Intrinsics or in Motif ?
 

pd@pd@x.co.uk (Paul Davey) (06/07/91)

>>>>> On 4 Jun 91 16:26:51 GMT, fcolin@cenaath.cena.dgac.fr (Francois-Regis COLIN) said:

Francois> I am using Motif 1.1 and I want to do different action on a button
Francois> depending on single click or double-click. I have try to put
Francois> the following translation table on this button:
Francois> <Btn1Down> : Arm() \n\
Francois> <Btn1Down>(2) : Activate()
Francois> but I cannot get this to work correctly:
Francois>  I make a single click the Arm callback is called
Francois>  but when I make a double click the Arm callback is called
Francois>  with the activate callbak .
Francois>  the doc says that the sorter sequence is not called if
Francois>  the events maps the longest sequence ?
Francois>  is this normal or a bug in the Intrinsics or in Motif ?

Normal, multiple clicks are a documented exception to the `longest
sequence' rule.

You'll have to code a single click procedure that uses an application
time out to perform the single action, and then cancel this if another
single click is received during the delay period, then initiating a
double click action.


--
 Regards,			 pd@x.co.uk          IXI Limited
	Paul Davey		 pd@ixi.uucp         62-74 Burleigh St.
				 ...!uunet!ixi!pd    Cambridge  U.K.
 "These are interesting times"   +44 223 462 131     CB1  1OJ      
				 USA: 1 800 XDESK 57

fcolin@ics2.cenaath.cena.dgac.fr (Francois-Regis COLIN) (06/17/91)

Why this not done in the Intrinsics ??
this made the multi-click specification unuseable

/-----------------------------------------------------------------------------\
|Francois-Regis COLIN                         |  fcolin@dgac.fr               |
|Centre d'Etudes de la Navigation Aerienne    |  fcolin@cenaath.cena.dgac.fr  |
|Division INTERFACE CONTROLEUR SYSTEME        |  Phone: (+33) 1 69 84 51 96   |
|Orly Sud 205                                 |       	(+33) 1 69 84 51 50   |
|91542 ORLY AEROGARE CEDEX, FRANCE            |  Fax:   (+33) 1 69 84 56 97   |
\-----------------------------------------------------------------------------/