Nicolas Cellier uploaded a new version of Multilingual to project The Trunk:
http://source.squeak.org/trunk/Multilingual-nice.250.mcz==================== Summary ====================
Name: Multilingual-nice.250
Author: nice
Time: 11 December 2019, 9:45:47.879387 pm
UUID: ebe6fac0-efa6-449b-8e4c-7eb3fd167b47
Ancestors: Multilingual-mt.249
Nuke keyValueIndex (my pleasure)
The intention was for accessing either event buffer at 3 (macRoman) or 6 (UTF32/UCS4)
Currently the choice is between 6 or 6 (it could have been dependent on VM version in 2007, but it's not and never was in Cog/Spur)
Anyway, the code was testing for presence of #SugarLaunche instead of #SugarLauncher, so it would not have worked as intended (if ever we can distinguish 6 from 6).
=============== Diff against Multilingual-mt.249 ===============
Item was changed:
KeyboardInputInterpreter subclass: #MacUnicodeInputInterpreter
+ instanceVariableNames: ''
- instanceVariableNames: 'keyValueIndex'
classVariableNames: ''
poolDictionaries: ''
category: 'Multilingual-TextConversion'!
Item was changed:
----- Method: MacUnicodeInputInterpreter>>nextCharFrom:firstEvt: (in category 'keyboard') -----
nextCharFrom: sensor firstEvt: evtBuf
| keyValue mark |
keyValue := evtBuf at: 6.
mark := self japaneseSpecialMark: keyValue.
mark notNil
ifTrue: [^ mark].
- keyValue < 256
- ifTrue: [^Character value: keyValue].
"Smalltalk systemLanguage charsetClass charFromUnicode: keyValue."
^ Unicode value: keyValue!
Item was changed:
KeyboardInputInterpreter subclass: #UnixUnicodeInputInterpreter
+ instanceVariableNames: ''
- instanceVariableNames: 'keyValueIndex'
classVariableNames: ''
poolDictionaries: ''
category: 'Multilingual-TextConversion'!
Item was removed:
- ----- Method: UnixUnicodeInputInterpreter>>initialize (in category 'initialization') -----
- initialize
- | satisfiesVersion launcherClass |
- launcherClass := Smalltalk at: #SugarLaunche ifAbsent: [nil].
- satisfiesVersion := launcherClass notNil and: [launcherClass current isRunningInSugar].
- satisfiesVersion
- ifTrue: [keyValueIndex := 6]
- ifFalse: [keyValueIndex := 6 "it might have to be 3, but probably different logic to check the VM version would be better."]!
Item was removed:
- ----- Method: UnixUnicodeInputInterpreter>>keyValueIndex (in category 'accessing') -----
- keyValueIndex
- ^ keyValueIndex!
Item was changed:
----- Method: UnixUnicodeInputInterpreter>>nextCharFrom:firstEvt: (in category 'keyboard') -----
nextCharFrom: sensor firstEvt: evtBuf
| keyValue mark |
+ keyValue := evtBuf at: 6.
- keyValue := evtBuf at: self keyValueIndex.
mark := self japaneseSpecialMark: keyValue.
mark notNil
ifTrue: [^ mark].
keyValue < 256
ifTrue: [^ Character value: keyValue].
"Smalltalk systemLanguage charsetClass charFromUnicode: keyValue."
^ Unicode value: keyValue!