changeset 297:7d431a32f71e

Fix: IME ole call and string processing.
author Frank Benoit <benoit@tionex.de>
date Sat, 23 Aug 2008 03:55:06 +0200
parents 4289aa6cbc0c
children 8fa53b71485d
files dwt/widgets/IME.d
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/dwt/widgets/IME.d	Fri Aug 22 18:06:47 2008 +0200
+++ b/dwt/widgets/IME.d	Sat Aug 23 03:55:06 2008 +0200
@@ -193,11 +193,11 @@
                 hr = OS.VtblCall (3, pProvider, cast(int)&pEnum);
                 if (hr is OS.S_OK) {
                     void* pDispInfo;
-                    TF_DISPLAYATTRIBUTE* tempPda;
+                    TF_DISPLAYATTRIBUTE* tempPda = new TF_DISPLAYATTRIBUTE();
                     /* pEnum.Next () */
                     while ((hr = OS.VtblCall (4, pEnum, 1, cast(int) &pDispInfo, 0 )) is OS.S_OK) {
                         /* pDispInfo.GetAttributeInfo(); */
-                        OS.VtblCall (5, pDispInfo, cast(int)&tempPda);
+                        OS.VtblCall (5, pDispInfo, cast(int)cast(void*)tempPda);
                         /* pDispInfo.Release () */
                         OS.VtblCall (2, pDispInfo);
                         if (tempPda.bAttr is attInfo) {
@@ -405,9 +405,9 @@
                     Display display = this.display;
                     display.lastKey = 0;
                     display.lastVirtual = display.lastNull = display.lastDead = false;
-                    length_ = chars.length;
+                    length_ = chars.codePointCount;
                     for (int i = 0; i < length_; i++) {
-                        char c = chars.charAt (i);
+                        dchar c = chars[ i .. $ ].firstCodePoint();
                         display.lastAscii = c;
                         event = new Event ();
                         event.character = c;