[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 

	"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')
	] 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.

   - Andreas

More information about the seaside mailing list