Comment On I Call It The "Click2"

Andrew Parsons has some pretty big shoes to fill at his company. Among many other revolutionary inventions, his predecessor single-handedly developed one of most innovative GUI elements ever seen: the Click2. What's so incredible about this is that it adds an entire dimension to selection via a computer mouse: if a user clicks one time ("Click") a different action is performed than if she clicks two times ("Click2"). Following is the (VB6) machinery behind this astonishing creation ... [expand full text]
« PrevPage 1 | Page 2Next »

Re: I Call It The "Click2"

2005-08-15 14:31 • by Bellinghman
So the actual action was determined not only by whether there was one click or two, but by when the timer event occurred?

Phew!

Re: I Call It The "Click2"

2005-08-15 14:38 • by El Duderino
40805 in reply to 40804
There's a timer involved in this?  How can you tell?  I mean, the object (?) name tmrClickTimer is sort of vague on this.

Re: I Call It The "Click2"

2005-08-15 14:44 • by Ross Day
Help! Help!  My square wheel doesn't roll very well!

Re: I Call It The "Click2"

2005-08-15 14:45 • by GalacticCmdr
I am not a VBguy so I might not be up on all the fiddly bits, but near
as I can tell actually clicking the button does not initiate any
action. It simply flips this toggle button. I am calling it a toggle
button because it will toggle between two states until the timer comes
along a clears it again to the empty state.



An FSM should look like the following I believe.



    empty state ---> 1.click <---[ click event]---> 2.click



So, depending on the duration of the timer you might be in any state as
the user clicks the button (does not see anything happen) then clicks a
few more time.



Thus Click2 is more like State 2.

Re: I Call It The &quot;Click2&quot;

2005-08-15 14:45 • by Daveh
If the timer fires between the user's first click and second click,
you'll end up with 2 single-click events, instead of a single, uh,
dual-click (not the same as a double click evidently). I'm curious as
to what the timer interval was set to. Too fast and you'll have a
problem dual-clicking, too slow and the user will be waiting for their
single-click to process.

Re: I Call It The &quot;Click2&quot;

2005-08-15 14:46 • by dan jones
wow... this is user interface design at its most obfuscated... not only is there a timer involved, but it acts like a queue to hold all the different requests... polling its own tag value to see just what's up... what happens if the user clicks three times?  the value is set back to 1.  and no indication that this will happen, either -- like, say, changing the label name to indicate that different actions will be taken depending on whether the number of clicks is odd or even.

this is teh lame.

Re: I Call It The &quot;Click2&quot;

2005-08-15 14:50 • by uniposter
This "Click2" technology is sure to revolutionize the world of user interface design.

Re: I Call It The &quot;Click2&quot;

2005-08-15 15:06 • by whojoedaddy
That's just funny. They have the ability to extend it beyond two clicks though ... triple click anyone?

Re: I Call It The &quot;Click2&quot;

2005-08-15 15:06 • by spacey
40813 in reply to 40811
just when i was starting to think that MY job sucks....



click2 saves the day....

Re: I Call It The &quot;Click2&quot;

2005-08-15 15:07 • by Anonymous
Maybe the programmer just wanted a different maximum time interval than you get with DblClick.

Re: I Call It The &quot;Click2&quot;

2005-08-15 15:10 • by PstScrpt
Damn, even if you didn't know that there was a double-click event, why not just keep a LastClickTime variable?

Re: I Call It The &quot;Click2&quot;

2005-08-15 15:14 • by mizhi
40816 in reply to 40815
PstScrpt:
Damn, even if you didn't know that there was a
double-click event, why not just keep a LastClickTime variable?




That is was a trade secret. [:)]

Re: I Call It The &quot;Click2&quot;

2005-08-15 15:18 • by JamesCurran

Also, let's not ignore the lines:


'MsgBox "Unknown Button: " & aryArgs(1)


Commented-out, which to me says "I could figure out why I was getting the error message, but it's easier just to silence it".


 

Re: I Call It The &quot;Click2&quot;

2005-08-15 15:25 • by res2
40818 in reply to 40815

PstScrpt:
Damn, even if you didn't know that there was a double-click event, why not just keep a LastClickTime variable?


It looks like it is used on multiple controls, therefore he needs to know which control was (double) clicked on...


<SNIP>


    'Click twice if already clicked
    If tmrClickTimer.Tag = "1.lblSetText" Then
        tmrClickTimer.Tag = "2.lblSetText"
    Else
        tmrClickTimer.Tag = "1.lblSetText"
    End If


<SNIP>


    
            Select Case aryArgs(1)
                Case "cmdLoadFile"
                    Call cmdLoadFile_Click
               
<SNIP>


Not that that is an excuse for this abomination... [6]


Actually this reminds me of something I ran across last week... someone re-invented the case statement in vbscript. Now to find it again and send it in [:O]

Re: I Call It The &quot;Click2&quot;

2005-08-15 15:29 • by rogthefrog
40819 in reply to 40812

whojoedaddy:
That's just funny. They have the ability to extend it beyond two clicks though ... triple click anyone?


In fact, it's very easy to make it go to ELEVEN!!!!!!!!!!

Re: I Call It The &quot;Click2&quot;

2005-08-15 15:29 • by Dustin
40820 in reply to 40814
lol. It must be for a program with people who click verrry slowwwly.

Re: I Call It The &quot;Click2&quot;

2005-08-15 15:38 • by Dustin
40821 in reply to 40816
mizhi:
PstScrpt:
Damn, even if you didn't know that there was a
double-click event, why not just keep a LastClickTime variable?




That is was a trade secret. [:)]




Doh! Apparently I've never used a forum before. I meant to quote this
and to say that it must be for people who click very slowly. *But
really*, I think it's a simple case of over-architecting. I do it when
I get bored [:)] You know, like a Rube-Goldberg illustration. (Please
don't flame me, It's just a joke!)

Re: I Call It The &quot;Click2&quot;

2005-08-15 15:50 • by Anonymous
I can't (and won't) defend the implementation, but I wouldn't be
surprised if this was the result of one or more users who couldn't
master the double click.  Some people have a very hard time double
clicking for some reason, and the developer may have been told to "Make
it work!!!!" 

Re: I Call It The &quot;Click2&quot;

2005-08-15 15:51 • by dubwai
40824 in reply to 40821
Ah...  There's nothing quite like working with an app that not only implements double click incorrectly but ignores your double click speed setting in Whendoes.

Re: I Call It The &quot;Click2&quot;

2005-08-15 16:02 • by DavidK
40825 in reply to 40824
I'm going to use this to put a triple click easter egg into my site.



No-one will ever find it!

Re: I Call It The &quot;Click2&quot;

2005-08-15 16:14 • by Gary R
What happens if the user does a genuine double-click?  IIRC, you will get one Click event, then a DblClick event?  So this code will count it as a single click?

Re: I Call It The &quot;Click2&quot;

2005-08-15 16:15 • by dubwai
40827 in reply to 40825

Anonymous:
I'm going to use this to put a triple click easter egg into my site.

No-one will ever find it!


My old boss showed me one that he created with a triple right-click once.

Re: I Call It The &quot;Click2&quot;

2005-08-15 16:21 • by JamesCurran
40828 in reply to 40820

Anonymous:
lol. It must be for a program with people who click verrry slowwwly.


Actually, you have to click kinda fast, because if a tmrClickTimer_Timer occurs between the first and second clicks, you get two first clicks.

Re: I Call It The &quot;Click2&quot;

2005-08-15 16:23 • by Rick Mogstad
40829 in reply to 40827
The triple click has actually been implemented in a lot of
products.  For example, in many windows apps you double-click to
select a word, then click again (a.k.a triple click) to select the
whole line. 



The only logical reason I can see for this code to exist (and im
stretching a bit here) is so that the single-click event doesnt fire if
they double click, and ONLY the double click event fires.  Kind of
sucks to have to wait .5 seconds (or whatever) for your single click to
be processed though.





Re: I Call It The &quot;Click2&quot;

2005-08-15 16:33 • by anonymous coward
what happened to using 2 buttons?

Re: I Call It The &quot;Click2&quot;

2005-08-15 16:38 • by coding slob
40832 in reply to 40829

Rick Mogstad:
The triple click has actually been implemented in a lot of products.  For example, in many windows apps you double-click to select a word, then click again (a.k.a triple click) to select the whole line. 

The only logical reason I can see for this code to exist (and im stretching a bit here) is so that the single-click event doesnt fire if they double click, and ONLY the double click event fires.  Kind of sucks to have to wait .5 seconds (or whatever) for your single click to be processed though.



or could it be that he didn't know or understand lblSetText_DblClick() event?

Re: I Call It The &quot;Click2&quot;

2005-08-15 16:40 • by eagle
Ignoring the fact that I don't know anything about how timers in VB6
work, I wonder what will happen if for example the call to
"cmdLoadFile_Click" takes longer than a single timer interval ??

Re: I Call It The &quot;Click2&quot;

2005-08-15 16:50 • by Rick Mogstad
40834 in reply to 40832
Anonymous:

Rick Mogstad:
The triple click
has actually been implemented in a lot of products.  For example,
in many windows apps you double-click to select a word, then click
again (a.k.a triple click) to select the whole line. 

The
only logical reason I can see for this code to exist (and im stretching
a bit here) is so that the single-click event doesnt fire if they
double click, and ONLY the double click event fires.  Kind of
sucks to have to wait .5 seconds (or whatever) for your single click to
be processed though.



or could it be that he didn't know or understand lblSetText_DblClick() event?







The point, though, is that even if you implement both the
lblSetText_Click() event and the lblSetText_DblClick() event, both will
fire when you double click.  The Click event will fire first, then
the DblClick event will fire afterward.  With this based approach,
you could have a "1 or the other" type approach, which isnt really
possible otherwise. 



Like I said, its a stretch, but could explain the thinking.

Re: I Call It The &quot;Click2&quot;

2005-08-15 16:54 • by dubwai
40835 in reply to 40834

Rick Mogstad:


The point, though, is that even if you implement both the lblSetText_Click() event and the lblSetText_DblClick() event, both will fire when you double click.  The Click event will fire first, then the DblClick event will fire afterward.  With this based approach, you could have a "1 or the other" type approach, which isnt really possible otherwise. 

Like I said, its a stretch, but could explain the thinking.


Hmm.  A solution to incompatible single-click and double-click handling.  Could be.  That's a fine bit of forensic pathology you did there.

Re: I Call It The &quot;Click2&quot;

2005-08-15 17:02 • by Rick Mogstad
40836 in reply to 40835
dubwai:

Rick Mogstad:


The point,
though, is that even if you implement both the lblSetText_Click() event
and the lblSetText_DblClick() event, both will fire when you double
click.  The Click event will fire first, then the DblClick event
will fire afterward.  With this based approach, you could have a
"1 or the other" type approach, which isnt really possible
otherwise. 

Like I said, its a stretch, but could explain the thinking.


Hmm.  A solution to incompatible single-click and double-click
handling.  Could be.  That's a fine bit of forensic pathology
you did there.





Lets just say that I have to work with people who may or may not use
this kind of approach for things..... on a regular basis....





Re: I Call It The &quot;Click2&quot;

2005-08-15 17:13 • by Hank Miller
WTF!  Double click is the most human interface invented.   All
because back in 1984 Apple wanted to advertise that you couldn't push
the wrong button.   Windows is slowly moving away from
this.    Everyone else is trying too, because it does
not work.



Have you ever watched an old person try to double click
something?  It is frusterating.   It is hard to hold the
mouse still while clicking within the allotted time (actually holding
the mouse still while clicking is difficult).   The allotted
time cannot be safely increased because power users are unwilling to
wait any longer when they want two single clicks.





Re: I Call It The &quot;Click2&quot;

2005-08-15 17:20 • by uniposter
40838 in reply to 40837
Anonymous:
WTF!  Double click is the most human interface invented.   All
because back in 1984 Apple wanted to advertise that you couldn't push
the wrong button.   Windows is slowly moving away from
this.    Everyone else is trying too, because it does
not work.



Have you ever watched an old person try to double click
something?  It is frusterating.   It is hard to hold the
mouse still while clicking within the allotted time (actually holding
the mouse still while clicking is difficult).   The allotted
time cannot be safely increased because power users are unwilling to
wait any longer when they want two single clicks.








Yeah I hear they're moving away from monitors and speakers too because they're way too hard for deaf mutes to use.

Re: I Call It The &quot;Click2&quot;

2005-08-15 17:20 • by Rank Amateur
40839 in reply to 40822

Anonymous:
I can't (and won't) defend the implementation, but I wouldn't be surprised if this was the result of one or more users who couldn't master the double click.  Some people have a very hard time double clicking for some reason, and the developer may have been told to "Make it work!!!!" 


It would have to be quite the PHB to tell a developer that, because now there's a double click that is even harder to use. When you try to double click, sometimes you get a double click, sometimes you get two single clicks even when clicking exactly the same way, depending on some invisible timer event. Or you're trying to single click: You click. Nothing happens (timer event hasn't occurred yet), so you click again. Oops. Double click. You're such a luser.


Of course, there are lots of users that have trouble with double click, but the solution is to not use double click, except as a shortcut for the non-digitally-challenged to do something that can be done with menus or something.


As for doing this to prevent a single click event firing when double clicking, the WTF is that the developer doesn't understand double clicking. It should always  do the single click action (generally selection), then augment it some way (e.g., execute dialog box action or open properties box).


Let me guess: he wants to support double clicking of "buttons." That might explain why he's got clicking and double clicking of labels and images. That's just a plain bad idea. You want some sort of power-user activation of buttons? Try metakey-clicking.


I bet he supports double clicking of checkboxes too.


--RA

Re: I Call It The &quot;Click2&quot;

2005-08-15 17:21 • by Manni

Wow, damn. I try to defend VB programmers since I know we are not the best in the world, but I can't defend this. Using a timer...to figure out a double click... I suppose the timer thing is an OK way of doing it, but it still feels dirty. Especially when you consider that the DblClick event already exists...


You heard it here folks, the pro-VB troll just shot down one of his own. Right now Ghandi is having a snowball fight with Mother Theresa in Hell.

Re: I Call It The &quot;Click2&quot;

2005-08-15 17:23 • by chb
Now I'm ready for the morse code button
Click for short, dblClick for long

.--  -  ..-.





Re: I Call It The &quot;Click2&quot;

2005-08-15 17:32 • by PstScrpt
40842 in reply to 40837

Anonymous:
Have you ever watched an old person try to double click something?  It is frusterating.   It is hard to hold the mouse still while clicking within the allotted time (actually holding the mouse still while clicking is difficult).   The allotted time cannot be safely increased because power users are unwilling to wait any longer when they want two single clicks.


Settings/Control Panel/Mouse: "Double-click speed" is on the first tab.

Re: I Call It The &quot;Click2&quot;

2005-08-15 18:02 • by JamesCurran
40843 in reply to 40834

Rick Mogstad:
With this based approach, you could have a "1 or the other" type approach, which isn't really possible otherwise. 


Nonsense.  It's a bit of a nuisance to set up, and does require setting a timer, but the procedure for handling a "double click without doing the single click action" is fairly easy, widely documented and widely used --On any window (in MSWindows) single click on the icon in the upper left corner, and the menu displays.  Double click and the window closes without the menu appearing.


Basically, you tell the control to only send single click notifications. When a click event occurs, you set a timer for the double-click timeout.  If a second click arrives before the timer ticks, do the double-click action and kill the timer.  If not, on the timer tick, do the single click action (and kill the timer)


So, basically, he's sorta on the right track.  The WTF here is that the timer is constantly going and is asynchronous with the clicks..


 


 

Re: I Call It The &quot;Click2&quot;

2005-08-15 18:12 • by Mung Kee
My "web savvy" wife must be hip to this functionality, since she annoying clicks every link on the web twice.

Re: I Call It The &quot;Click2&quot;

2005-08-15 18:27 • by dubwai
40845 in reply to 40837

Hank Miller:


Have you ever watched an old person try to double click something?  It is frusterating.   It is hard to hold the mouse still while clicking within the allotted time (actually holding the mouse still while clicking is difficult).   The allotted time cannot be safely increased because power users are unwilling to wait any longer when they want two single clicks.


Totally.  It be nice if there were some way to like, I don't know, set the double-click speed.   There isn't one that I know of.  Not in the control panel.  Definitely not under 'mouse' and not in the 'double click speed' section.

Re: I Call It The &quot;Click2&quot;

2005-08-15 18:57 • by Rick Mogstad
40846 in reply to 40843
JamesCurran:

Rick Mogstad:
With this
based approach, you could have a "1 or the other" type approach, which
isn't really possible otherwise. 


Nonsense.  It's a bit of a nuisance to set up, and does require
setting a timer, but the procedure for handling a "double click without
doing the single click action" is fairly easy, widely documented and
widely used --On any window (in MSWindows) single click on the icon in
the upper left corner, and the menu displays.  Double click and
the window closes without the menu appearing.


Basically, you tell the control to only send single click
notifications. When a click event occurs, you set a timer for the
double-click timeout.  If a second click arrives before the timer
ticks, do the double-click action and kill the timer.  If not, on
the timer tick, do the single click action (and kill the timer)


So, basically, he's sorta on the right track.  The WTF here is
that the timer is constantly going and is asynchronous with the clicks..





I guess I should have said "without an approach LIKE
this".  I am certainly not defending this guy's code by any means,
just trying to figure out what the intent was.  There is no
standard way to keep a click event from firing while trapping a double
click.  It really doesnt make sense that there should be a way to
do this standardly, as the first part of the double-click is a
single-click, which should fire an event. 



FWIW, your solution is mighty similar. 

Re: I Call It The &quot;Click2&quot;

2005-08-15 19:51 • by Andrew Parsons
Just so you all know and don't die wondering, the programmer didn't realise there was a double-click event.



So, don't credit him for forward thinking for triple clicks and the
like - it was a double-click replacement due to a lack of knowledge
about VB (and this was from a guy with 3-4 years VB experience).

Re: I Call It The &quot;Click2&quot;

2005-08-15 20:03 • by Bellinghman
40848 in reply to 40847
That wasn't 3-4 years experience. That was 3-4 days, repeatedly.

Re: I Call It The &quot;Click2&quot;

2005-08-15 20:08 • by coding slob
40849 in reply to 40847

Anonymous:
Just so you all know and don't die wondering, the programmer didn't realise there was a double-click event.

So, don't credit him for forward thinking for triple clicks and the like - it was a double-click replacement due to a lack of knowledge about VB (and this was from a guy with 3-4 years VB experience).


3-4 years VB experience is not enough to learn notice dblClick event?


It used to piss me off when I was looking for a job, and some recruiters wouldn't even talk to me 'cause job requirements asked for 5 years exp., while I only  had 3 or 4. Now it makes sense...

Re: I Call It The &quot;Click2&quot;

2005-08-15 20:37 • by A Wizard A True Star
40850 in reply to 40849

The code is horrifying, but here's my mild defense: In VB6, there's no _DblClick event on CommandButtons.


But I think there's a pretty good reason for that.


 


 

Re: I Call It The &quot;Click2&quot;

2005-08-15 20:38 • by dance2die
I have a faith in M$ implementation of DblClick event.



But sometimes when you think there is just too many bugs in M$ lib's, you might as well go with "Click2"...



All "Click2" needs now is a GPL license...

Re: I Call It The &quot;Click2&quot;

2005-08-15 20:40 • by A Wizard A True Star
40852 in reply to 40843
JamesCurran:

On any window (in MSWindows) single click on the icon in the upper left corner, and the menu displays.  Double click and the window closes without the menu appearing.



Uhhh.. which version of Windows are you using there? When I double click on the icon, the menu does appear for a split-second.


 

Re: I Call It The &quot;Click2&quot;

2005-08-15 20:41 • by WIldpeaks
40853 in reply to 40847

Maybe his boss is the type that expects that clicking many times on a button makes the damn program work faster (like those that expect that pressing again and again on the elevator's button will make it arrive faster), therefore requiring to know how many times the user clicked [:P]


 


PS: yes, I need sleep, lol..

Re: I Call It The &quot;Click2&quot;

2005-08-15 21:07 • by Amit Patankar
OMGWTF..... is there a petition
where i could sign in support of the litigation against that certain
company? I guess the decision has been made "And the programmer of the
year award goes to.......for his groundbreaking role in inventing Click2 and saving the computing world". I wish there was a emoticon for screaming out LOUD.


Re: I Call It The &quot;Click2&quot;

2005-08-15 21:14 • by Rick Mogstad
40856 in reply to 40852
A Wizard A True Star:
JamesCurran:

On any window (in MSWindows) single click on the icon in the upper
left corner, and the menu displays.  Double click and the window
closes without the menu appearing.



Uhhh.. which version of Windows are you using there? When I double
click on the icon, the menu does appear for a split-second.


 





Now that you mention it, so does mine....

Re: I Call It The &quot;Click2&quot;

2005-08-16 02:14 • by ProffK
40857 in reply to 40821
Anonymous:
mizhi:
PstScrpt:
Damn, even if you didn't know that there was a
double-click event, why not just keep a LastClickTime variable?




That is was a trade secret. [:)]




Doh! Apparently I've never used a forum before. I meant to quote this
and to say that it must be for people who click very slowly. *But
really*, I think it's a simple case of over-architecting. I do it when
I get bored [:)] You know, like a Rube-Goldberg illustration. (Please
don't flame me, It's just a joke!)




I won't flame you, but Rube Goldberg needs a flame or two.  I'd never seen his work before now, but apart from using only one of
his cartoons to describe excess detail/work, the rest a pretty
useless.  Each one is the same joke over again.  I fail to
see how anyone could ever in all time remain amused by these drawings
longer than halfway through the first one they ever see.

« PrevPage 1 | Page 2Next »

Add Comment