Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!ginosko!gem.mps.ohio-state.edu!apple!hercules!fernwood!decwrl!asente From: asente@decwrl.dec.com (Paul Asente) Newsgroups: comp.windows.x Subject: Re: Help with double-click recognition. Message-ID: <1924@bacchus.dec.com> Date: 14 Oct 89 01:34:19 GMT References: <1922@bacchus.dec.com> <603@granite.dec.com> <3954@helios.ee.lbl.gov> Organization: DEC Western Software Lab Lines: 37 In article <3954@helios.ee.lbl.gov> envbvs@epb2.lbl.gov (Brian V. Smith) writes: >Wait a second! >What about xterm's double/triple click and xrn's double/triple/quadruple >click recognition for text selection? > >Please explain how that works so well 8-) AHA! It all has to do with carefully selected actions. When you triple click in xterm, what really happens is you execute the single click action after the first click, the double click action after the second click, and the triple click action after the third. What you can't do is say "do one thing after a single click and something entirely different after a double click". The safest thing to to is to make double click build upon single click. Examples: single-click: go to position double-click: go to position and select a word or single-click: select a file name double-click: select a file name and open it in an editor You're actually ok as long as the single click item is reversible; you can do something like single-click: do single-click action double-click: undo single-click action, do double-click action Where you get into trouble is when the action is hard or impossible to reverse; you could do something like single-click: start editor on file double-click: kill editor process, start compiler on file but do you really want to? -paul asente asente@decwrl.dec.com decwrl!asente