What about a little rename in MouseEvent?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
27 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: What about a little rename in MouseEvent?

Geert Claes
Administrator
Ricardo Moran wrote
I totally agree with the color buttons being really confusing. What's funny is that it's not even consistent. For instance, preference "swapMouseButtons" comment is "if true, swaps mouse buttons 2 and 3". What's
that suppose to mean? Weren't mouse buttons colored?? :)

However, I have a question: once you change the names to left, right, middle, what will happen if swapMouseButtons is true? Will "middleClick" still mean "middleClick"?
True, I guess in a 3-button environment there will always be a "Primary", "Secondary" and "Middle" button, for left and right-handed people :)
Reply | Threaded
Open this post in threaded view
|

Re: What about a little rename in MouseEvent?

Lukas Renggli
In reply to this post by Marcus Denker-4
> *no* Colors have no *meaning* in this context. I can not even tell you the
> three colors we have now. And not at all which is supposed to be the middle one.

+1, I don't know the colors either.

> Colors for buttons make no sense *at all* if your buttons have no colors.

AFAIK, most operating systems number the mouse buttons.

- The primary button is what you use to perform actions (typically
left mouse button).
- The secondary buttons is what you use to open context menu
(typically right mouse button).
- The third button is the middle button, the fourth button, ...

Now I see that numbers are not that far from colors, but at least they
have a logical order. I don't like #select, #menu, #extra because I
does not make sense in any other context (for example games, or touch
applications) than a traditional GUI.

Lukas

--
Lukas Renggli
www.lukas-renggli.ch

Reply | Threaded
Open this post in threaded view
|

Re: What about a little rename in MouseEvent?

Nicolas Cellier
In reply to this post by Guillermo Polito
2011/1/24 Guillermo Polito <[hidden email]>:

>
>
> On Mon, Jan 24, 2011 at 10:22 AM, Nicolas Cellier
> <[hidden email]> wrote:
>>
>> Exactly : logicalRight can be different than physicalRight.
>> If you tell me this distinction is useless, then I'll ask you to
>> consider touch screen and other modern input devices.
>> That's why I ask this community to reformulate and think.
>
> Mmm, maybe we can work in little steps.  I think that renaming is a good
> first step for a refactor.  To refactor code you need to understand it, and
> the colors makes me not to understand it.
>

IMO, the correct order is:
1) understand current implementation
2) refactor

At least, after this lengthy thread, pretty all has been said about
red/yellow/blue buttons and I wish I don't hear anymore anyone
pretending he does not understand.
The summary is:

The logical squeak^H^H^H^H^H^Hpharo pointing input device is a mouse
with 3 buttons named red yellow and blue by historical reference to
Xerox Dorado machine (insert ref here).
In smalltalk-80,
- the red button (originally on the left) was generally used for selection;
- the yellow button (originally on the middle) was generally used for
contextual operation on the selection (via a pop up menu);
- the blue button (originally on the right) was generally used for
operation on the window (via another pop up menu).

Due to hardware differences from one machine to another (presence of
one, two or three buttons), and native OS feel differences (for
example, the button used for contextual pop up menu is the right
button rather than the middle in Microsoft windows), a level of
indirection is kept to insulate this logical level from physical
level.

The mapping from physical buttons to logical buttons is programmable.
On mouses with less than 3 buttons, other buttons can be emulated with
combinations of modifier keys.
Depending on user preferences, the mapping middle=yellow,right=blue
can be swapped, the default being to adhere to native OS conventions
(at least it should !).

Where exactly this mapping happens (VM and/or image) and how to
program it still has to be documented, but hey, you got the grounds ;)

>>
>> Then you'll can argue at will whether the logical level shall be named
>> #right #logicalRight or #blue, I don't care.
>
> Then we can change it again.
>

It all depends if the changes are on a private kernel API or a public
API exposed to third party packages.
In later case we'd better not gratuitously raise the burden on early
Pharo adopters.

>>
>> For newer kind of events (gestures), we have a more difficult dilemna:
>> emulate the feel or use native OS facilities...
>> The question is of same nature as native look.
>> Even if we choose to rely on OS, we have to think of cross platform
>> portability and ways to emulate missing capabilities.
>> In other words, I doubt we can afford the elimination of a level of
>> indirection.
>>
>> Maybe it's time to refactor indeed, but please, bring up your brain
>> one level above this colour naming battle.
>> Don't replay battles of the past, turn toward the future.
>
> Oh, that was no my intention.  I didn't even know of past battles before
> this thread.  I was only tired of unmeaningful colors.
> Please, don't turn the discussion like that, I didn't mean that :S.
>
> Guille
>

Marcus suggested this was previously a Squeak taboo :)
I didn't mean to inhibit changes or discourage you, sorry if I did.
All I want is that this kind of decision be rationalized rather than randomized.
It's better to think of next steps in advance rather than step back
from a dead end, isn't it?

Nicolas

>>
>> Nicolas
>>
>> 2011/1/24 Geert Claes <[hidden email]>:
>> >
>> >
>> > Guillermo Polito wrote:
>> >>
>> >> I hate yellowButtonPressed and redButtonPressed and blueButtonPressed
>> >> messages.
>> >>
>> >> Why not lefClick, rightClick and "middleClick"?
>> >>
>> >
>> > I agree that the meaning of the colors is no longer useful, although
>> > "hate"
>> > is maybe a bit harsh :)
>> >
>> > Surely this has already been addressed in other environments?
>> > http://api.jquery.com/mousedown api.jquery.com/mousedown  for example
>> > also
>> > refers to the left, middle and right button.
>> >
>> > Even Apple's multi-touch "magic-mouse" talks about left and right-clicks
>> > (which is ironic as they have long resisted to even add a second button)
>> > ...
>> > but also mouse events for the "360° scroll", "Screen zoom" and
>> > "two-finger
>> > swipe".
>> > --
>> > View this message in context:
>> > http://forum.world.st/What-about-a-little-rename-in-MouseEvent-tp3233363p3233916.html
>> > Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
>> >
>> >
>>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: What about a little rename in MouseEvent?

Stéphane Ducasse
In reply to this post by Guillermo Polito
I would like to have the iSqueak Event hierarchy. It is published in PharoTaskForces if I remember correctly.

Stef


> I hate yellowButtonPressed and redButtonPressed and blueButtonPressed messages.
>
> Why not lefClick, rightClick and "middleClick"?
>
> Cheers,
> Guille


Reply | Threaded
Open this post in threaded view
|

Re: What about a little rename in MouseEvent?

csrabak
In reply to this post by Marcus Denker-4
> Em  24/01/2011  05:25,  Marcus  Denker  <  [hidden email]  >
> escreveu:
>  On Jan 24, 2011, at 5:39 AM, Guillermo Polito wrote:
> >  I hate yellowButtonPressed and redButtonPressed and
> > blueButtonPressed  messages.   Why  not lefClick,  rightClick  and
> >  "middleClick"?
>
>
>  Yes.
>  Back in  the days,  the color buttons  where "holy cows".  You just
> could not even suggest to change it.

On the other hand, as the buttons of mice can be reassigned, the 'names'
"right" and "left" could become ambiguous...


my 0.019999...

--
Cesar Rabak





 

Reply | Threaded
Open this post in threaded view
|

Re: What about a little rename in MouseEvent?

Geert Claes
Administrator
In reply to this post by Lukas Renggli
Lukas Renggli wrote
...
AFAIK, most operating systems number the mouse buttons.

- The primary button is what you use to perform actions (typically left mouse button).
- The secondary buttons is what you use to open context menu (typically right mouse button).
- The third button is the middle button, the fourth button, ...

Now I see that numbers are not that far from colors, but at least they have a logical order. I don't like #select, #menu, #extra because I does not make sense in any other context (for example games, or touch applications) than a traditional GUI.
Agree, on one side there are the physical buttons (button 1, 2, 3 etc) and on the other hand there are the  events they trigger.  e.g. for right-handed people button 1 would be the primary button where for left-handed this could very well be button 3.

Then again, maybe it is time to look a bit further as it looks like the near future is heading towards a world without any physical buttons where there is no need to number or name buttons at all :)

http://www.geek.com/articles/gadgets/new-apple-patent-puts-a-display-on-the-magic-mouse-20110124/

Additional gesture events:
http://www.youtube.com/watch?v=JKlkte1aOOw
Reply | Threaded
Open this post in threaded view
|

Re: What about a little rename in MouseEvent?

Fernando olivero-2
Regarding the "looking into the future" i was thinking that we will go
the Smalltalk way, by reifying such new events. Instead of "reusing"
plain old three button mouse events.
And leave the MouseEvent for what they were originally conceived (the
proposed renaming )

In this scenario a touch pad would generate a TouchPadEvent, and a
multibutton mouse would generate "MultiButtonMouseEvent"

Fernando

On Tue, Jan 25, 2011 at 10:58 AM, Geert Claes <[hidden email]> wrote:

>
>
> Lukas Renggli wrote:
>>
>> ...
>> AFAIK, most operating systems number the mouse buttons.
>>
>> - The primary button is what you use to perform actions (typically left
>> mouse button).
>> - The secondary buttons is what you use to open context menu (typically
>> right mouse button).
>> - The third button is the middle button, the fourth button, ...
>>
>> Now I see that numbers are not that far from colors, but at least they
>> have a logical order. I don't like #select, #menu, #extra because I does
>> not make sense in any other context (for example games, or touch
>> applications) than a traditional GUI.
>>
>
> Agree, on one side there are the physical buttons (button 1, 2, 3 etc) and
> on the other hand there are the  events they trigger.  e.g. for right-handed
> people button 1 would be the primary button where for left-handed this could
> very well be button 3.
>
> Then again, maybe it is time to look a bit further as it looks like the near
> future is heading towards a world without any physical buttons where there
> is no need to number or name buttons at all :)
>
> http://www.geek.com/articles/gadgets/new-apple-patent-puts-a-display-on-the-magic-mouse-20110124/
>
> Additional gesture events:
> http://www.youtube.com/watch?v=JKlkte1aOOw
>
> --
> View this message in context: http://forum.world.st/What-about-a-little-rename-in-MouseEvent-tp3233363p3235798.html
> Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
>
>

12