[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: double-click

	Back in 1.3.2, something like this would "work":
	(defobfun (dialog-item-click-event-handler *my-button*) (where)
	  (if (double-click-p)
	    (print "Double")
	    (print "Single)))

	Specifically, it would print Double *OR* Single.

	In 2.0b1 (without patches), it prints single on the first half of the
	double-click and double on the second half:

	(make-instance 'dialog
	    (make-instance 'button-dialog-item
	      #'(lambda (item)
	          (declare (ignore item))
	          (if (double-click-p)
	            (print "Double")
	            (print "Single"))))))

	I'm not quite sure what object used to delay to check for a double-click
	before invoking the various click-event-handlers, but I sure wish it still

	I'd appreciate any advice on how to implement something that would behave
	the old way.  I'm very unsure of how to do this.

	"TANSTAAFL" Rich lynch@aristotle.ils.nwu.edu

Actually, the old way is incorrect if you look at Macintosh standards
for the way single and double clicks should be handled.  The user
interface standards say that a double-click action should be an
extension of the single click action so that every double click is
processed first as a single click and then as a double click.  If
you want the single click to do nothing and then have the double-click
do something, that is valid within the standard, but if you want a
single click to do something and then have a double click do something
that does not include the single-click action you are violating the
standard.  I would rethink the interface if that's what you want; use
shift-click or something to differentiate the two actions.

Paul Krueger (pkrueger@cray.com)