2011/1/24 Guillermo Polito <[email protected]>:
>
>
> On Mon, Jan 24, 2011 at 10:22 AM, Nicolas Cellier
> <[email protected]> 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 <[email protected]>:
>> >
>> >
>> > 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 via email to