[Seaside] Re: [Pharo-project] mouse right button

Andreas Raab andreas.raab at gmx.de
Mon Feb 8 22:28:12 UTC 2010


Lukas Renggli wrote:
> So that means if I take a recent Pharo-Core 1.0 and if I do not touch
> #swapMouseButtons then it should work with 3ButtonMouse=1 on Windoze
> too?

The preferences need to agree. Here's a test you can use to ensure 
consistency:

testWinVM3ButtonMousePreference
	"Ensure that swapMouseButtons agrees with 3ButtonMouse preference"
	| iniData iniPref exePath |
	SmalltalkImage current platformName = 'Win32' ifFalse:[^self].
	exePath := SmalltalkImage current getSystemAttribute: 0.
	iniData := [
		(FileStream readOnlyFileNamed: (exePath copyUpToLast: $.), '.ini')
			 contentsOfEntireFile
	] on: Error do:[:ex| ex return: ''].
	iniPref := false. "default is OFF"
	iniData linesDo:[:line|
		(line beginsWith: '3ButtonMouse') ifTrue:[
			iniPref := (line copyAfter: $=) withBlanksTrimmed ~= '0'.
		].
	].
	self assert: iniPref = Preferences swapMouseButtons.

Cheers,
   - Andreas


More information about the seaside mailing list