double-click for system window

Simon Michael simon at joyful.com
Tue Dec 9 16:53:21 UTC 2003


This weekend I tried to implement something I've wanted for a long time, 
double-click to collapse and expand system windows. Anybody done this 
already ?

I got it basically working and then found DoubleClickExample (thanks for 
that). I find it increases usability quite a bit.

What I'm doing right now is calling waitForClickThingy in 
SystemWindow>>mouseDown:, then doubleClick: does collapseOrExpand.
I don't activate the window in mouseDown: any more, instead this happens 
in click:, startDrag:, or in doubleClick: if we are expanding.

Problem: on my slow P266, calling activate in click: tends to prevent 
the following click from being recognized as a doubleClick:. Curiously 
this happens about 10% of the time in my latest bells-and-whistles image 
but about 90% of the time in an earlier cleaner version. If I remove the 
activate from click:, double-click always works.

Squeak tends to lose events on this system, but in this case I'm 
guessing the cause is simple: activate is slow and delays the second 
click until after the double-click interval has passed. I'd try 
increasing it just to test this but can't remember how. Also I can't 
explain the difference on the clean image.

Any ideas or suggestions ?




More information about the Squeak-dev mailing list