The Trunk: Multilingual-nice.108.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Multilingual-nice.108.mcz

commits-2
Nicolas Cellier uploaded a new version of Multilingual to project The Trunk:
http://source.squeak.org/trunk/Multilingual-nice.108.mcz

==================== Summary ====================

Name: Multilingual-nice.108
Author: nice
Time: 26 March 2010, 1:08:03.056 am
UUID: 9798aa40-8c05-4e6d-a675-c581537093fb
Ancestors: Multilingual-cmm.107

Correct CombinedChar>>#add:
-----------------------------------------------
Details:
Compositions classVar is a:
<Dictionary
        key: firstLetter charCode
        value: (Dictionary
                key: diacritical charCode
                value: combined charCode)>
combined instVar is a <Character>

Previous code was double bogus:
1) accessing (Compositions at: firstLetter charCode) at: firstLetter charCode
instead of (Compositions at: firstLetter charCode) at: diacritical charCode
2) storing combined charCode (Integer) in combined, instead of a Character.


=============== Diff against Multilingual-cmm.107 ===============

Item was changed:
  ----- Method: CombinedChar>>add: (in category 'composition') -----
  add: char
 
  | dict elem |
  codes ifNil: [codes := Array with: char. combined := char. ^ true].
-
  dict := Compositions at: combined charCode ifAbsent: [^ false].
+ elem := dict at: char charCode ifAbsent: [^ false].
-
- elem := dict at: combined charCode ifAbsent: [^ false].
-
  codes := codes copyWith: char.
+ combined := Character leadingChar: self base leadingChar code: elem.
- combined := elem.
  ^ true.
  !