[comp.windows.x] Wanted: info on DOUBLE CLICKING displayed images

paul@davox.UUCP (Paul Kneipp) (01/29/91)

I apologize for the back-to-back requests... This is for another individual in my group.

In this world of mice and windows, it seems that everyone (OpenLook, Motif, Microsoft, etc) lets you DOUBLE CLICK displayed images in order to initiate an action (load, open, etc.).

It would seem that the way to do this is to set timers and flags and trap the DC event in your own code.  Thats what I'm doing, and it works fine... Is this what others are doing?  Am I attempting to re-invent some wheel that is, as of yet, unknown to me?

If there is something that will keep me firmly on the "standards" trail and/or save me un-necessary effort and/or make my code work better and/or keep me from appearing ignorant when others look at my code,  please let me know.

Posted by 

Paul Kneipp (uunet!davox!paul)

for

Andy Scharmer (uunet!davox!andy)

Davox Corp.
Billerica, MA.
(508) 667-4455

steve@Advansoft.COM (Steve Savitzky) (01/30/91)

Double-clicking in the Mac world is a (poor) substitute for not having
enough buttons on your mouse.  There are occasions where it is
appropriate, however.

It is possible, and in my opinion preferable, to implement
double-clicking *without* time constraints, by simply detecting a
second click in the same location as the previous one.  Usually, a
click is used to select an object or position a cursor, in which case
you simply define a different meaning for clicking on an object or
position which is already selected.

I have used this semantics to implement a browser in Gnu Emacs.

Note that whatever you do, you have to make sure that the single-click
action is harmless, since it's what will happen if the user blows the
timeout.  I have found, watching a number of beginning Mac users, that
the timeout on double-clicking can be hard to get right, and very
puzzling when it fails ("but I *did* click it twice!").
--
\ --Steve Savitzky--  \ ADVANsoft Research Corp \ REAL hackers use an AXE! \
 \ steve@advansoft.COM \ 4301 Great America Pkwy \ #include<disclaimer.h>   \
  \ arc!steve@apple.COM \ Santa Clara, CA 95954   \        408-727-3357      \
   \__ steve@arc.UUCP _________________________________________________________

mouse@lightning.mcrcim.mcgill.EDU (01/30/91)

> In this world of mice and windows, it seems that everyone (OpenLook,
> Motif, Microsoft, etc) lets you DOUBLE CLICK displayed images in
> order to initiate an action (load, open, etc.).

> It would seem that the way to do this is to set timers and flags and
> trap the DC event in your own code.

At present, this is how you have to do it.  The current protocol does
not support anything that will let you do this correctly.

> Thats what I'm doing, and it works fine...

It works fine in your tests, because the machines involved are not
overloaded and the network between them is fast and working.  In the
presence of overloaded machines and/or flaky networks, it is possible
for the user to double-click, but for the first click to reach the
client fast and the second click to be delayed, so as to make them
appear to be two single clicks.  (IMO this situation needs
improvement.)

					der Mouse

			old: mcgill-vision!mouse
			new: mouse@larry.mcrcim.mcgill.edu