Automatic Button Swap (was Re: An 3.9 image for developers)

Bert Freudenberg bert at freudenbergs.de
Thu Sep 14 20:07:06 UTC 2006


Klaus D. Witzel wrote:
> Hi Gary,
> 
> on Thu, 14 Sep 2006 20:58:01 +0200, you wrote:
>> Or perhaps this should be put in, due to VM differences:
>>
>> Preferences class>>swapMouseButtons
>>     "If we are on windows, flip anyway so that we are compatible
>>     with other oses."
>>
>>     |answer|
>>     answer := self
>>         valueOfFlag: #swapMouseButtons
>>         ifAbsent: [false].
>>     SmalltalkImage current platformName = 'Win32'
> 
> Good idea but, what happens when the VM is corrected (the dev.image will 
> be downlodable for many years to come).
> 
> /Klaus
> 
>>         ifTrue: [answer := answer not].
>>     ^answer

Please do *not* put such changes in obscure places. There is a 
well-defined place for that (#setPlatformPreferences).

Besides, the actual button behavior depends also on the VM preferences 
(F2 menu on Windows). That's a much better place to adjust this to your 
liking.

- Bert -



More information about the Squeak-dev mailing list