Mercurial > projects > dwt-mac
diff dwt/widgets/Combo.d @ 139:86fc761a24ae
Fixes #11
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Thu, 04 Jun 2009 23:23:10 +0200 |
parents | 63a09873578e |
children | d8c1f0540bcb |
line wrap: on
line diff
--- a/dwt/widgets/Combo.d Wed Jun 03 00:36:31 2009 +0200 +++ b/dwt/widgets/Combo.d Thu Jun 04 23:23:10 2009 +0200 @@ -1235,7 +1235,7 @@ int start = selection.x, end = selection.y; ushort keyCode = nsEvent.keyCode (); NSString characters = nsEvent.charactersIgnoringModifiers(); - wchar character = characters.characterAtIndex(0); + char character = toChar(characters.characterAtIndex(0)); switch (keyCode) { case 51: /* Backspace */ if (start is end) { @@ -1253,7 +1253,7 @@ if (character !is '\t' && character < 0x20) return true; oldText = new_String ([character]); } - String newText = verifyText (oldText, start, end, nsEvent); + char[] newText = verifyText (oldText, start, end, nsEvent); if (newText is null) return false; if (charCount - (end - start) + newText.length () > textLimit) { return false;