[Pharo-project] Issue 3664 in pharo: MacUnicodeInputInterpreter use utf32 keycode unconditionally

pharo at googlecode.com pharo at googlecode.com
Sun Feb 6 12:14:57 CET 2011


Status: Accepted
Owner: stephane... at gmail.com
Labels: Milestone-1.3 Type-Squeak

New issue 3664 by stephane... at gmail.com: MacUnicodeInputInterpreter use  
utf32 keycode unconditionally
http://code.google.com/p/pharo/issues/detail?id=3664

Name: Multilingual-bf.136
Author: bf
Time: 31 January 2011, 5:03:34.511 pm
UUID: c2e685e7-a73c-44b6-93b8-1bf6319972eb
Ancestors: Multilingual-ul.135

- make MacUnicodeInputInterpreter use utf32 keycode unconditionally, since  
VMs older than 4.x are not supported anymore anyway.

=============== Diff against Multilingual-ul.135 ===============

Item was removed:
- ----- Method: MacUnicodeInputInterpreter>>initialize (in  
category 'initialization') -----
- initialize
-       | satisfiesVersion |
-       satisfiesVersion := self
-                               majorMinorBuildFrom: SmalltalkImage current  
vmVersion
-                               satisfies: [:major :minor :build |
-                                       major >= 4 or: [
-                                       major >= 3 and: [minor >= 8 and:  
[build >= 7]]]].
-       satisfiesVersion
-               ifTrue: [keyValueIndex := 6]
-               ifFalse: [keyValueIndex := 3]!

Item was removed:
- ----- Method: MacUnicodeInputInterpreter>>keyValueIndex (in  
category 'accessing') -----
- keyValueIndex
-       ^ keyValueIndex!

Item was removed:
- ----- Method: MacUnicodeInputInterpreter>>majorMinorBuildFrom:satisfies:  
(in category 'version check') -----
- majorMinorBuildFrom: aString satisfies: aBlock
-       | v |
-       v := aString
-                               ifNil: [^ false].
-       v := ((v copyAfter: $])
-                               findTokens: $ ) last findTokens: $..
-       v size = 3
-               ifFalse: [^ false].
-       v := v
-                               collect: [:s | s initialIntegerOrNil
-                                               ifNil: [^ false]].
-       ^ aBlock valueWithArguments: v asArray!

Item was changed:
  ----- Method: MacUnicodeInputInterpreter>>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) squeakToIso].
        "Smalltalk systemLanguage charsetClass charFromUnicode: keyValue."
        ^ Unicode value: keyValue!





More information about the Pharo-project mailing list