Nicolas Cellier uploaded a new version of Multilingual to project The Inbox:
http://source.squeak.org/inbox/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! |
Le mer. 11 déc. 2019 à 21:45, <[hidden email]> a écrit : Nicolas Cellier uploaded a new version of Multilingual to project The Inbox: |
In reply to this post by commits-2
Le mer. 11 déc. 2019 à 21:45, <[hidden email]> a écrit : Nicolas Cellier uploaded a new version of Multilingual to project The Inbox: Ah sorry, the change above was not advertised... It is because Unicode>>value: will perform the exact same test, so no need to duplicate the work!"Smalltalk systemLanguage charsetClass charFromUnicode: keyValue." |
Free forum by Nabble | Edit this page |